[Python-ideas] syntax to continue into the next subsequent except block
Gregory P. Smith
greg at krypto.org
Sat Sep 15 08:28:59 CEST 2012
On Thu, Sep 13, 2012 at 5:26 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>wrote:
> Paul Wiseman wrote:
>> except IOError as err:
>> if err.errno == 2:
>> continue #This would continue the except down to the next check,
> I think a better way to address this would be to allow guard
> expressions on the except clauses.
> except IOError as err if err.errno == 2:
I like that. Granted, what are the use cases beyond the errno one that PEP
3151 largely addresses?
> Python-ideas mailing list
> Python-ideas at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas