Message177418
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. |
|
Date |
User |
Action |
Args |
2012-12-13 16:59:08 | eric.snow | set | recipients:
+ eric.snow, rhettinger, serhiy.storchaka |
2012-12-13 16:59:08 | eric.snow | set | messageid: <1355417948.69.0.539396210196.issue16669@psf.upfronthosting.co.za> |
2012-12-13 16:59:08 | eric.snow | link | issue16669 messages |
2012-12-13 16:59:08 | eric.snow | create | |
|