Hi,

While I would like to get such new attributes, I see drawbacks as blocker
issues and so I am fine with this PEP rejection. Performance is too
critical for most common exceptions.

For me one blocker issue is the high risk of creating reference cycles. And
the weak reference API isn't the most practical :-(

Moreover I expect slowdown, whereas exceptions are already expensive :-(
Recently, internal code to get an attribute has been reworked to avoid
exception whenever possible, and it made the code faster.

Victor

Le vendredi 15 mars 2019, Brett Cannon <br...@python.org> a écrit :
> The steering council felt the PEP was too broad and not focused enough.
Discussions about adding more attributes to built-in exceptions can
continue on the issue tracker on a per-exception basis (and obviously here
for any broader points, e.g. performance implications as I know that has
come up before when the idea of storing relevant objects on exceptions).
> Thanks to Sebastian Kreft for taking the time to write the PEP in the
first place.
>

-- 
Night gathers, and now my watch begins. It shall not end until my death.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to