mutators

What do you call functions which get and set?

The jQuery framework has a lot of functions which will either retrieve or mutate values depending on the parameters passed: $(this).html(); // get the html $(this).html('blah'); // set the html Is there a standard name for functions which behave like this? ...

C++ program design question

Hello! In couple of recent projects that I took part in I was almost addicted to the following coding pattern: (I'm not sure if there is a proper name for this, but anyway...) Let's say some object is in some determined state and we wan't to change this state from outside. These changes could mean any behaviour, could invoke any algori...

Appending turns my list to NoneType

In Python Shell, I entered: aList = ['a', 'b', 'c', 'd'] for i in aList: print(i) and got a b c d but when I tried: aList = ['a', 'b', 'c', 'd'] aList = aList.append('e') for i in aList: print(i) and got Traceback (most recent call last): File "<pyshell#22>", line 1, in <module> for ...

alphabetically sorted if statement not working

The if statement below has a problem in it somewhere and I can not figure it out. Any conventions or method misuses that might be causing it to not function right? checkList is a user inputed sentence and lis is a large list of words. def realCheck(checkList): string = "".join(checkList) print string wordList = str...