On 07/07/2010 10:58 AM, Paul Rubin wrote:
> Paul McGuire <pt...@austin.rr.com> writes:
>> is completely forward and backward incompatible.  The workaround is to
>> rewrite as:
>>
>>     except ExceptionType:
>>         ex = sys.exc_info()[0]
>>
>> which works just fine in 2.x and 3.x.
> 
> Are you sure?  I wonder if there might be some race condition that could
> make it fail.

Luckily, no: (lib. docs on exc_info())

This function returns a tuple of three values that give information
about the exception that is currently being handled. The information
returned is specific both to the current thread and to the current stack
frame.

> 
> I didn't even know about (or forgot) this change.  Yucch.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to