PEP 8 exegetics: conditional imports?
Christian Heimes
lists at cheimes.de
Fri Aug 7 15:44:57 EDT 2009
kj wrote:
> I seek the wisdom of the elders. Is there a consensus on the matter
> of conditional imports? Are they righteous? Or are they the way
> of the wicked?
imports in functions are dangerous and may lead to dead locks if they
are mixed with threads. An import should never start a thread and you
should avoid to import code in threads.
Christian
More information about the Python-list
mailing list