embarrassing class question

Brendan brendandetracey at yahoo.com
Thu Oct 21 14:09:50 EDT 2010


Two modules:
x.py:
class x(object):
    pass

y.py:
from x import x
class y(x):
    pass

Now from the python command line:
>>> import y
>>> dir(y)
['__builtins__', '__doc__', '__file__', '__name__', '__package__',
'x', 'y']

I do not understand why class 'x' shows up here.



More information about the Python-list mailing list