[issue9507] namedtuple should not hardcode the class name in __repr__

2010-08-04 Thread Paul Giannaros
New submission from Paul Giannaros : collections.namedtuple hardcodes the class name which is reported in the new type's __repr__. This is irritating when subclassing a namedtuple: A = collections.namedtuple('A', '') class B(A): pass print B() # shows 'A()' It might not be often that they

[issue9507] namedtuple should not hardcode the class name in __repr__

2010-08-04 Thread R. David Murray
Changes by R. David Murray : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue9507] namedtuple should not hardcode the class name in __repr__

2010-08-04 Thread R. David Murray
Changes by R. David Murray : -- stage: -> patch review versions: +Python 3.1, Python 3.2 -Python 3.3 ___ Python tracker ___ ___ Python

[issue9507] namedtuple should not hardcode the class name in __repr__

2010-08-04 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue9507] namedtuple should not hardcode the class name in __repr__

2010-08-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Applied in r83808 for Python 3.2. Am not backporting because I don't consider it a bug and the documented subclassing technique is: class A(namedtuple('A', 'x y')): ... -- resolution: -> accepted stage: patch review -> committed/rejected