[Python-ideas] except expression
Chris Angelico
rosuav at gmail.com
Wed Feb 19 14:47:07 CET 2014
On Thu, Feb 20, 2014 at 12:39 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> Chris suggested that there is an example of this in the imap module, but
> it hasn't hit the PEP yet.
Most of the examples are out in a separate file. I'm not sure which of
them, if any, should be blessed with a mention in the PEP itself.
https://github.com/Rosuav/ExceptExpr/blob/master/examples.py#L356
Part of the mess with that one is that it really needs an author's
eye; I can show that this could be done cleanly with the new syntax,
but I can't make it both clean *and* trivially provably performing the
same job. It'd probably want some other way of rendering the exception
to text.
ChrisA
More information about the Python-ideas
mailing list