[Python-ideas] [RFC] Draft-PEP: Adding structured data to built-in exceptions
Eric V. Smith
eric at trueblade.com
Thu Apr 10 22:18:07 CEST 2014
On 04/06/2014 01:32 PM, Sebastian Kreft wrote:
> Continuing the discussion started
> in https://mail.python.org/pipermail/python-ideas/2014-February/025601.html,
> attached is a draft PEP explaining the rationale of the idea and the
> required changes.
>
> I'm looking forward to your comments.
I'm generally in favor. My only concern would be object lifetimes if
you're holding references to actual objects.
For motivating use cases, one might be the difficulty in a string parser
getting this correct:
>>> {}["fo\"\\'\""]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'fo"\\\'"'
More information about the Python-ideas
mailing list