[Python-3000] PEP 3125 -- a modest proposal (original) (raw)
Andrew Koenig ark at acm.org
Tue May 8 15:08:51 CEST 2007
- Previous message: [Python-3000] PEP 3125 -- a modest proposal
- Next message: [Python-3000] PEP 3125 -- a modest proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Too dangerous. The most common Python syntax error (by far, even for experienced users) is omission of a colon. If the missing colon starts to have its own special meaning, that would not be a good thing.
It's not special -- omitting it would have exactly the same effect as omitting a colon does today in a single-line statement. That is, today you can write
if x < y: x = yor you can forget the colon and write
if x < y x = yand (usually) be diagnosed by the compiler. My proposal would make
if x < y:
x = yand
if x < y
x = yhave the same meanings as (respectively) the first two examples above, so the fourth example would still be diagnosed as an error for the same reason.
- Previous message: [Python-3000] PEP 3125 -- a modest proposal
- Next message: [Python-3000] PEP 3125 -- a modest proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]