problem with global scope after package import via __init__.py

Denis S. Otkidach ods at fep.ru
Wed Aug 14 05:41:03 EDT 2002


On Tue, 13 Aug 2002, Mark Frazer wrote:

MF> That's not what I wanted though.  In order for my package
MF> users to access
MF> scalars, I can move the scalar definitions into
MF> p/__init__.py and have the
MF> package files import p itself.

Be aware of circular import being a bad practice, it may lead to
hard-to-debug errors.

-- 
Denis S. Otkidach
http://www.python.ru/      [ru]
http://diveinto.python.ru/ [ru]





More information about the Python-list mailing list