Question about circular imports

Ethan Furman ethan at stoneleaf.us
Tue Feb 28 12:58:28 EST 2012


OKB (not okblacke) wrote:
>     	Anyway, testing this just reinforced my distaste for circular 
> imports.  Just trying to think about how it ought to work with a 
> importing c but then c and d importing each other makes my brain hurt.  
> Refactoring the files so that common code is in a separate library 
> imported by both is easier to understand, and has the nice side bonus 
> that it works.
> 

+1 QOTW



More information about the Python-list mailing list