[Python-Dev] _not_found attribute on ImportError
chris at simplistix.co.uk
Mon Feb 11 11:58:58 CET 2013
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 '_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:
Have any other exceptions grown new attributes in Python 3?
Simplistix - Content Management, Batch Processing & Python Consulting
More information about the Python-Dev