On Thu, Sep 13, 2012 at 5:26 PM, Greg Ewing <greg.ewing@canterbury.ac.nz>wrote:
Paul Wiseman wrote:
try: operation() except IOError as err: if err.errno == 2: do_something() else: 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.
try: operation() 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?
-- Greg
______________________________**_________________ Python-ideas mailing list Python-ideas@python.org http://mail.python.org/**mailman/listinfo/python-ideas<http://mail.python.org/mailman/listinfo/python-ideas>