[Python-Dev] Requesting pronouncement on PEP 463: Exception-catching expressions (original) (raw)

Barry Warsaw barry at python.org
Wed Mar 12 16:44:59 CET 2014


On Mar 12, 2014, at 11:14 AM, Brett Cannon wrote:

While I'm +0 on the idea, I'm -1 on the syntax; I just don't like having a colon in an expression.

I'm -0 on the idea, mostly be cause it's never occurred to me to even need something like this, and because I don't personally think the existing spellings are deficient. It doesn't bother me that we have dict.get() for example. I'd also find the proposed syntax difficult to read if it was used more commonly than traditional try/except.

That being said, the colon really bothers me, despite what is written in "Common objections". True, colons are used in places other than suite introduction, but with exception handling, colons do introduce a new suite, so its use here is jarring. There may also be tooling issues (e.g. editors, syntax colorizers, parsers, etc.).

Anyway, put it on the language summit track and we can have a fun debate. :)

-Barryu



More information about the Python-Dev mailing list