Message177381
Here are two patches which implementation two different interface for same feature.
In first patch you can use *doc* and *field_docs* arguments to specify namedtuple class docstring and field docstrings. For example:
Point = namedtuple('Point', 'x y',
doc='Point: 2-dimensional coordinate',
field_docs=['abscissa', 'ordinate'])
In second patch you can use *doc* argument to specify namedtuple class docstring and *field_names* argument can be a sequence of pairs: field name and field docstring. For example:
Point = namedtuple('Point', [('x', 'absciss'), ('y', 'ordinate')],
doc='Point: 2-dimensional coordinate')
What approach is better?
Feel free to correct a documentation. I know that it need a correction. |
|
Date |
User |
Action |
Args |
2012-12-12 17:31:35 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger |
2012-12-12 17:31:35 | serhiy.storchaka | set | messageid: <1355333495.19.0.152758378027.issue16669@psf.upfronthosting.co.za> |
2012-12-12 17:31:34 | serhiy.storchaka | link | issue16669 messages |
2012-12-12 17:31:34 | serhiy.storchaka | create | |
|