[Python-ideas] Detecting circular imports ?

Antoine Pitrou solipsis at pitrou.net
Thu Nov 18 16:22:36 CET 2010


On Thu, 18 Nov 2010 16:14:35 +0100
Tarek Ziadé <ziade.tarek at gmail.com> wrote:
> 
> I don't know of this was mentioned before, or how hard it would be.
> But it would be nice if Python had a specific "CircularImportError"
> raised in that case, or something..
> That would be a fabulous hint for developers.

It can't be an error, since circular imports are supported.
There could be a warning, but IMO it would need to be silenced by
default (which means ImportWarning isn't appropriate).

Regards

Antoine.





More information about the Python-ideas mailing list