[Python-Dev] _not_found attribute on ImportError (original) (raw)
Chris Withers chris at simplistix.co.uk
Mon Feb 11 11:58:58 CET 2013
- Previous message: [Python-Dev] _not_found attribute on ImportError
- Next message: [Python-Dev] _not_found attribute on ImportError
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 11/02/2013 10:54, Nick Coghlan wrote:
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 'notfound' 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.notfound = 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
OK.
Have any other exceptions grown new attributes in Python 3?
cheers,
Chris
-- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
- Previous message: [Python-Dev] _not_found attribute on ImportError
- Next message: [Python-Dev] _not_found attribute on ImportError
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]