This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author afoglia
Recipients afoglia, antlong, belopolsky, rhettinger
Date 2010-07-27.19:35:34
SpamBayes Score 0.0015522154
Marked as misclassified No
Message-id <1280259337.25.0.777007800543.issue9391@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-07-27 19:35:37afogliasetrecipients: + afoglia, rhettinger, belopolsky, antlong
2010-07-27 19:35:37afogliasetmessageid: <1280259337.25.0.777007800543.issue9391@psf.upfronthosting.co.za>
2010-07-27 19:35:35afoglialinkissue9391 messages
2010-07-27 19:35:34afogliacreate