On Fri, Jan 7, 2011 at 7:35 AM, P.J. Eby <[email protected]> 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) _______________________________________________ Web-SIG mailing list [email protected] Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com
