Re: [Python-Dev] PEP 463: Exception-catching expressions

2014年2月21日 17:08:24 -0800

21.02.2014 18:37, Guido van Rossum wrote:
I'm put off by the ':' syntax myself (it looks to me as if someone
forgot a newline somewhere)
As I mentioned at python-ideas I believe that parens neutralize,
at least to some extent, that unfortunate statement-ish flavor
of the colon.
This one has some statement-like smell:
 msg = seq[i] except IndexError: "nothing"
But this looks better, I believe:
 msg = (seq[i] except IndexError: "nothing")
Or even (still being my favorite):
 msg = seq[i] except (IndexError: "nothing")
Cheers.
*j
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to