Why return None?
Raymond Hettinger
python at rcn.com
Thu Aug 26 01:31:34 EDT 2004
Martin DeMello <martindemello at yahoo.com> wrote in message news:<S2YWc.201615$M95.19420 at pd7tw1no>...
> It seems to be a fairly common pattern for an object-modifying method to
> return None - however, this is often quite inconvenient.
The FAQs provide a clue to Guido's thinking on this subject:
http://www.python.org/doc/faq/general.html#why-doesn-t-list-sort-return-the-sorted-list
Raymond Hettinger
More information about the Python-list
mailing list