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 eric.snow
Recipients eric.snow, rhettinger, serhiy.storchaka
Date 2012-12-13.16:59:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1355417948.69.0.539396210196.issue16669@psf.upfronthosting.co.za>
In-reply-to
Content
What is wrong with the following?

class Point(namedtuple('Point', 'x y')):
    """A 2-dimensional coordinate

    x - the abscissa
    y - the ordinate

    """

This seems more clear to me.  namedtuple is in some ways a quick-and-dirty type, essentially a more true implementation of the intended purpose of tuple.  The temptation is to keep adding on functionality but we should resist until there is too much imperative.  I don't see it here.  While I don't have a gauge of how often people use (or would use) docstrings with nametuple, I expect that it's relatively low given the intended simplicity of namedtuple.
History
Date User Action Args
2012-12-13 16:59:08eric.snowsetrecipients: + eric.snow, rhettinger, serhiy.storchaka
2012-12-13 16:59:08eric.snowsetmessageid: <1355417948.69.0.539396210196.issue16669@psf.upfronthosting.co.za>
2012-12-13 16:59:08eric.snowlinkissue16669 messages
2012-12-13 16:59:08eric.snowcreate