Subclasses in Python

Terry Reedy tjreedy at udel.edu
Fri Apr 30 01:19:51 EDT 2004


"Greg Ewing" <greg at cosc.canterbury.ac.nz> wrote in message
news:c6sdiq$fk1bl$1 at ID-169208.news.uni-berlin.de...
> Thomas Philips wrote:
> > Perfect! But tell me, how did you know to use __name__? I typed
> > dir(object) and dir(Player) in IDLE, and in neither case did __name__
> > show up.
>
> Probably it's an oversight on the part of whoever implemented
> the dir() method for classes. I guess you just have to find
> out things like that by hanging out in c.l.py.:-)

And submit a bug report on sourceforge so some future person will find it
with dir().

tjr







More information about the Python-list mailing list