This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iritkatriel
Recipients iritkatriel
Date 2022-01-10.14:21:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641824483.89.0.494458683054.issue46332@roundup.psfhosted.org>
In-reply-to
Content
Lib/logging/config.py has this, which looks like it's partly remnants of old exception handling APIs: 

except ImportError:
    e, tb = sys.exc_info()[1:]
    v.__cause__, v.__traceback__ = e, tb
    raise v

It is clearer if written as:

except ImportError as e:
    v = ValueError('Cannot resolve %r: %s' % (s, e))
    raise v from e


(note that this doesn't copy the traceback from e to v, but this is redundant information anyway because e is chained to v as the cause).
History
Date User Action Args
2022-01-10 14:40:07iritkatrielunlinkissue46332 messages
2022-01-10 14:21:23iritkatrielsetrecipients: + iritkatriel
2022-01-10 14:21:23iritkatrielsetmessageid: <1641824483.89.0.494458683054.issue46332@roundup.psfhosted.org>
2022-01-10 14:21:23iritkatriellinkissue46332 messages
2022-01-10 14:21:23iritkatrielcreate