bug? context managers vs ImportErrors

Chris Withers chris at simplistix.co.uk
Thu Aug 19 23:25:56 CEST 2010


Christian Heimes wrote:
>> Why is 'e' ending up as a string rather than the ImportError object?
>>
>> This is with Python 2.6.5 if that makes a difference...
> 
> It's a known bug in Python 2.6 and earlier. See
> http://docs.python.org/whatsnew/2.7.html#porting-to-python-2-7

When was it introduced?

I've been relying on the value being an exception a lot in 2.5, and only 
hit problems in 2.6 with ImportError, everything else seems fine, which 
doesn't agree with Florent's statements in #7853...

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk



More information about the Python-list mailing list