Message111720
I could see adding a doc parameter to the collections.namedtuple. So that
---
>>> Point = collections.namedtuple("Point", ("x", "y"), doc="My point class")
>>> Point.__doc__
My point class
---
(Or it could keep the currently created docstring and append the new doc after an empty line.)
---
>>> Point = collections.namedtuple("Point", ("x", "y"), doc="My point class")
>>> Point.__doc__
Point(x, y)
My point class
---
That being said, I can't think of a strong use case. If you care enough to add a docstring, you're probably making a type used repeatedly in the code. In that case, you can just use the verbose parameter and paste the definition into your code.
I'm still in favor of it, simply because it would be a nice parameter to have, but I don't think it's important. |
|
Date |
User |
Action |
Args |
2010-07-27 19:35:37 | afoglia | set | recipients:
+ afoglia, rhettinger, belopolsky, antlong |
2010-07-27 19:35:37 | afoglia | set | messageid: <1280259337.25.0.777007800543.issue9391@psf.upfronthosting.co.za> |
2010-07-27 19:35:35 | afoglia | link | issue9391 messages |
2010-07-27 19:35:34 | afoglia | create | |
|