Peter Otten wrote:

>> ##### Code of mod2.py #####
> import __main__ as mod1
>> def getA():
>>return mod1.En.A
>> ##### End of mod2.py #####
> 
> but that would hardcode the assumption that __main__ is always mod1.py.

I should have mentioned the cyclic dependency -- if two modules import each 
other one may not be completely set up when the other tries to access it.


-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to