Daniel Stutzbach <stutzb...@google.com> added the comment:

> Comment: This rule applies to special methods like __getitem__
> and __setitem__. 'lis.append(item)' is equivalent to
> lis.__setitem__(len(lis):len(lis), item), so it should not be so
> surprising that it has the same return.

It's not true for all special methods.  __iadd__ and __imul__ return the list 
itself.

That's a minor nitpick though.  +1 on adding "and return None" to the 
docstrings of methods that often trip people up.  Not everyone will read them, 
but some people will.

----------
nosy: +stutzbach

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12192>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to