Why do only callable objects get a __name__?

John Ladasky john_ladasky at sbcglobal.net
Mon Nov 18 15:38:28 EST 2013


On Monday, November 18, 2013 12:13:42 PM UTC-8, I wrote:

> 2. If I created a superclass of namedtuple which exposed type(namedtuple).__name__ in the namespace of the namedtuple itself, would I be doing anything harmful?

Sigh.  Of course, that should read "subclass", not "superclass."  Because I was thinking of a type being, in a sense, "higher up" the object hierarchy than an instance, I accidentally reached for the wrong word.





More information about the Python-list mailing list