On 03/14/2011 02:33 AM, Greg Ewing wrote:
Tim Lesher wrote:
Because named tuple prefixes a single underscore to its added method
names (_asdict, _replace, and _make), those methods' docstrings are
omitted from pydoc:
IMO these should be called __asdict__, __replace__ and
__make__. Users are perfectly entitled to make up their
own single-underscore names, so using a single underscore
is not sufficient to prevent name collisions.
namedtuple won't let you use names starting with an underscore, so the
single underscore names are sufficient.
Eric.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com