Creating classes and objects more than once?

Harold Fellermann dadapapa at googlemail.com
Thu Nov 27 13:32:57 EST 2008


On Nov 27, 6:42 pm, Viktor Kerkez <alefn... at gmail.com> wrote:
> Is this a bug?

It is not a bug: the dictionaries are different because they are
loaded from different modules.

>>> import os
>>> import test.data
>>> test.data
<module 'test.data' from 'test/data.pyc'>
>>> os.chdir('test')
>>> import data
>>> data
<module 'data' from 'data.pyc'>
>>> test.data is data
False



More information about the Python-list mailing list