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/2013-February/123938.html below:

[Python-Dev] _not_found attribute on ImportError

[Python-Dev] _not_found attribute on ImportError [Python-Dev] _not_found attribute on ImportErrorNick Coghlan ncoghlan at gmail.com
Mon Feb 11 11:54:26 CET 2013
On Mon, Feb 11, 2013 at 6:08 PM, Chris Withers <chris at simplistix.co.uk> wrote:
> Hi All,
>
> I see in Python 3, some ImportErrors have grown a '_not_found' attribute.
> What's the significance of this attribute and where/how is it added?
>
> The only way I can seem to create this attribute is:
>
> ex = ImportError
> ex._not_found = True

It's something importlib does to get fromlists to behave the same way
they did in the C implementation.

It is set here:
http://hg.python.org/cpython/file/3.3/Lib/importlib/_bootstrap.py
To make these pass:
http://hg.python.org/cpython/file/3.3/Lib/test/test_importlib/import_/test_fromlist.py

You'd have to ask Brett which specific test is affected, or else you
could comment out the line that sets _not_found and see what breaks
(you may need to refreeze _frozen_importlib first).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
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