[Python-ideas] Docstrings for namedtuple

Serhiy Storchaka storchaka at gmail.com
Wed Dec 12 18:40:03 CET 2012


What interface is better for specifying namedtuple field docstrings?

     Point = namedtuple('Point', 'x y',
                        doc='Point: 2-dimensional coordinate',
                        field_docs=['abscissa', 'ordinate'])

or

     Point = namedtuple('Point', [('x', 'absciss'), ('y', 'ordinate')],
                        doc='Point: 2-dimensional coordinate')

?

http://bugs.python.org/issue16669




More information about the Python-ideas mailing list