New submission from Irit Katriel <[email protected]>:
Following issue45711 the redundancy in exc_info is now explicit. This means
that we can now safely update places that still use python2-style exception
handling code, like:
exc_type, exc_value = sys.exc_info()[:2]
try:
response = dumps(
Fault(1, "%s:%s" % (exc_type, exc_value)),
encoding=self.encoding, allow_none=self.allow_none)
response = response.encode(self.encoding, 'xmlcharrefreplace')
finally:
# Break reference cycle
exc_type = exc_value = None
----------
assignee: iritkatriel
components: Library (Lib)
messages: 411561
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Update Python2-style exception handling
type: enhancement
versions: Python 3.11
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46510>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com