[issue10516] Add list.clear() and list.copy()

Raymond Hettinger report at bugs.python.org
Thu Feb 24 08:01:19 CET 2011


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

[Éric Araujo]
> +"L.clear() -> None -- remove all items from L");
> It looks like other methods that return None 
> just omit the “-> type” part.

These kind of nitty comments really aren't helpful.
It consumes more time to talk about them than they're worth.
In this case, Eli was modeling after the docstring in dictobject.c:

   PyDoc_STRVAR(clear__doc__,
   "D.clear() -> None.  Remove all items from D.");

Just because list.remove.__doc__ failed to consistently follow that convention doesn't make Eli's patch incorrect.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10516>
_______________________________________


More information about the Python-bugs-list mailing list