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/2009-April/088630.html below:

[Python-Dev] Lazy importing (was Rethinking intern() and its data structure)

[Python-Dev] Lazy importing (was Rethinking intern() and its data structure) [Python-Dev] Lazy importing (was Rethinking intern() and its data structure)Greg Ewing greg.ewing at canterbury.ac.nz
Sat Apr 11 02:41:14 CEST 2009
Nick Coghlan wrote:

> I sometimes wish for a nice, solid lazy
> module import mechanism that manages to avoid the potential deadlock
> problems created by using import statements inside functions.

I created an ad-hoc one of these for PyGUI recently.
I can send you the code if you're interested.

I didn't have any problems with deadlocks, but I
did find one rather annoying problem. It seems that
an exception occurring at certain times during the
import process gets swallowed and turned into a
generic ImportError. I had to resort to catching
exceptions and printing my own traceback in order
to diagnose missing auto-imported names.

-- 
Greg
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