On Mar 13, 10:42 am, Paul Rubin <http://[EMAIL PROTECTED]> wrote: [...] > By Python convention, methods that mutate the object return None, and > also stuff that returns None doesn't generate output at the > interactive prompt.
A convention that does not always hold: >>> l = [1, 2, 3] >>> l.pop() 3 >>> l [1, 2] >>> There is also the .next() method: >>> i = iter([1, 2, 3]) >>> i.next() 1 >>> i.next() 2 >>> I can't think of others ATM in python 2.x but there might be some. Moreover PEP 3119 introduces .add(), .discard(), .toggle() for MutableSets which all mutate self and return a non None object. -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list