This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Rhamphoryncus
Recipients Rhamphoryncus, brett.cannon, bronger, dcjim, gvanrossum, jhylton, loewis, ncoghlan, tim.peters
Date 2009-08-31.21:44:36
SpamBayes Score 0.00015404193
Marked as misclassified No
Message-id <1251755079.04.0.0643343796981.issue992389@psf.upfronthosting.co.za>
In-reply-to
Content
The key distinction between this and a "bad" circular import is that
this is lazy.  You may list the import at the top of your module, but
you never touch it until after you've finished importing yourself (and
they feel the same about you.)

An ugly fix could be done today for module imports by creating a proxy
that triggers the import upon the first attribute access.  A more
general solution could be done with a lazyimport statement, triggered
when the target module finishes importing; only problem there is the
confusing error messages and other oddities if you reassign that name.
History
Date User Action Args
2009-08-31 21:44:39Rhamphoryncussetrecipients: + Rhamphoryncus, gvanrossum, tim.peters, loewis, jhylton, brett.cannon, dcjim, ncoghlan, bronger
2009-08-31 21:44:39Rhamphoryncussetmessageid: <1251755079.04.0.0643343796981.issue992389@psf.upfronthosting.co.za>
2009-08-31 21:44:37Rhamphoryncuslinkissue992389 messages
2009-08-31 21:44:37Rhamphoryncuscreate