[Web-SIG] Declaring PEP 3333 accepted (was: PEP 444 != WSGI 2.0)

Guido van Rossum guido at python.org
Fri Jan 7 17:01:25 CET 2011


On Fri, Jan 7, 2011 at 7:35 AM, P.J. Eby <pje at telecommunity.com> wrote:
> At 05:00 PM 1/7/2011 +1100, Graham Dumpleton wrote:
>>
>> Stupid question first. When running 2to3 on the example CGI code,
>
> Don't do that.  It's supposed to already be Python 3 code.  ;-)
>
> It did, however, reveal a bug where I have not in fact done the correct
> Python 3 thing:
>
>>                 if headers_sent:
>>                     # Re-raise original exception if headers sent
>> -                    raise exc_info[0], exc_info[1], exc_info[2]
>> +                    raise
>> exc_info[0](exc_info[1]).with_traceback(exc_info[2])
>>             finally:
>>                 exc_info = None     # avoid dangling circular ref
>
> Can somebody weigh in on what the correct translation here is?  The only
> real Python 3 coding I've done to date has been experiments to test changes
> to other aspects of WSGI.  ;-)

That translation works.

-- 
--Guido van Rossum (python.org/~guido)


More information about the Web-SIG mailing list