I have inherited some very old Python code:
and later:
This call to exception() without arguments fails on Python 2.7 (the oldest version I have available to me) and 3.10 (which I'm targeting).
Was this syntax supported in a really old version of Python? If so, with what should I replace it now to get the same semantics?
1 2 |
import logging _log = logging.getLogger( 'blah' ) |
1 2 3 4 |
try : <snip> except : _log.exception() |
Was this syntax supported in a really old version of Python? If so, with what should I replace it now to get the same semantics?