Hello, P.J. Eby <p...@...> writes: > > > 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.
You don't need the "with_traceback". Just "raise exc_info[1]". The original traceback is already attached to the exception instance (major difference from Python 2). Oh and by the way: headers_set = [] headers_sent = [] This is really a recipe for disaster. Please give these two variables clearly distinct names. Your example is very confusing to read because of this. Regards Antoine. _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com