Anthony Foglia <afog...@gmail.com> added the comment: 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. ---------- nosy: +afoglia _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9391> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com