A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-July/112470.html below:

[Python-Dev] Import lock considered mysterious

[Python-Dev] Import lock considered mysterious [Python-Dev] Import lock considered mysteriousPaul Moore p.f.moore at gmail.com
Fri Jul 22 12:30:40 CEST 2011
On 22 July 2011 10:29, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> The reason for *that* was that my main module was a stub
> that imported the real main module, which did all its
> work directly from the module code. So the whole program
> was effectively running inside an import statement and
> holding onto the import lock.

I realise you probably know this, but I think this is covered by the
standard advice to avoid having substantial code running at module
level (i.e., on import). It may be useful to clarify or further
emphasize that advice in the Python documentation.

Paul.

PS This is not to say that I oppose trying to reduce the chance of
this type of thing happening...
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4