[Python-3000] Exception Expressions

Jim Jewett jimjjewett at gmail.com
Thu Aug 31 20:21:32 CEST 2006

>     expr1 except expr2 if exc_type
>     print letters[7] except "N/A" if IndexError

I sort of like it, though I'm more worried than you about ugly code.

There have been many times when I wanted it so that I could use a list
comprehension (or generator comprehension) instead of a function or

The bad news is that I seem to be an anti-channeller, so my interest
is perhaps not a *good* sign.


More information about the Python-3000 mailing list