[Python-Dev] PEP 409 update [was: PEP 409 (original) (raw)

Paul Moore p.f.moore at gmail.com
Fri Feb 3 21:08:10 CET 2012


On 3 February 2012 19:18, Yury Selivanov <yselivanov.ml at gmail.com> wrote:

That's a bit far-fetched.  Using same level argumentation we can utilize even 0.  raise e from 0 (or -1), and use 0 object instead of Ellipsis.

Anyways, if the PEP is not yet fully approved, I'm minus one on allowing of using anything other than Exception instance or None in 'raise from' statement.

I may have missed something here, but as far as I am aware, the PEP is fundamentally only about allowing raise...from None to suppress chaining.

There is an extremely obscure case where certain (generally library, not end user) code might want to reinstate chaining. For that very obscure case, the PEP suggests setting cause to a sentinel value, and Ellipsis is used rather than inventing a new singleton for such a rare case. Purely by accident, the form "raise X from ..." will do the same as explicitly setting cause, and it's not worth the effort of testing for and rejecting this case.

This issue is so not worth arguing about, it's silly.

Paul.



More information about the Python-Dev mailing list