cannot find object instance

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Thu Aug 28 18:40:30 CEST 2008


On Thu, 28 Aug 2008 08:35:07 -0700, jimgardener wrote:

> moduleA.py
> --------------------
> import moduleB
>
> […]
> 
> moduleB.py
> ------------------
> import moduleA
> 
> […]

Don't do that.  Circular imports are a code smell.  If two modules are 
coupled that tight it's usually a sign that you want just one module or 
factoring out something into a third module that is imported by both old 
modules.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list