of which 2 and 3 are personal opinions.Hi Soni,
I think that your suggestion is identical to Shai's. It would be good, but unfortunately it has the 3 problems I raised in my email from an hour ago.
I'm gonna make a wild suggestion:
An explicit "raise" in an "except" body gets rewritten as "raise from"
the parent exception.
Hopefully this doesn't break anything, but, who knows. This means you get:
except Foo as e:
raise Bar
# raises Bar, because of Foo, as if by "raise Bar from e"
except Foo as e:
my_raise(Bar)
# raises Bar while handling Foo, as it currently stands.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/XN7B2ZSHKXAYN2G3OV2UVZD7JMIZ2PXV/
Code of Conduct: http://python.org/psf/codeofconduct/