Viktor Kerkez wrote: > Here is the situation: > > $ ls > test > $ cd test > $ ls > __init__.py data.py > $ cat __init__.py > > $ cat data.py > DATA = {} > > $ cd .. > $ python >>>> import os >>>> from test.data import DATA >>>> DATA['something'] = 33 >>>> os.chdir('test') >>>> from data import DATA as NEW_DATA >>>> DATA > {'something': 33} >>>> NEW_DATA > {} > > > Is this a bug?
No. You create an alias NEW_DATA in your local scope, but that alias still points to the same object, a dictionary. Diez -- http://mail.python.org/mailman/listinfo/python-list