[Python-ideas] Docstrings for namedtuple

Eli Bendersky eliben at gmail.com
Sun Dec 16 14:24:08 CET 2012


This may be a good time to say that personally I always disliked
> namedtuple's creation syntax. It is unpleasant in two respects:
>
> 1. You have to repeat the name
> 2. You have to specify the fields in a space-separated string
>
> I wish there was an alternative of something like:
>
> @namedtuple
> class Point:
>   x = 0
>   y = 0
>
>
And to the point of Serhiy's original topic, with this syntax there would
be no need to invent yet another non-standard way to specify things like
docstrings.

Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121216/d03a7704/attachment.html>


More information about the Python-ideas mailing list