Enums are Singletons - but not always?
Peter Otten
__peter__ at web.de
Sat May 23 15:50:33 EDT 2020
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.
More information about the Python-list
mailing list