[pypy-dev] Python 3 ...
Armin Rigo
arigo at tunes.org
Fri May 24 01:00:49 CEST 2013
Hi all,
Unrelated to everything, a comment about Python 3's unrivalled syntax.
You can now be hesitant in your programs! Try it out:
if len(x) > 0 and... and... and x[0] == 5:
More seriously, I'm used to type "..." somewhere to mean "fix me
first!". I didn't move to Python 3 so far, but if I had to pick a
reason, this one would be high on the list. Now the program will
associate a useless meaning to my "..." and try to execute it. Even
worse, in the usual case (a line containing only "...") it will work:
the line is completely ignored! You can write this:
def foo():
x = ...
...
and actually execute foo() without getting any error. Likely you'll
end with a crash later because this call to foo() didn't have the
expected effect, which you did not implement so far. Same with
"assert...", which just passes. Great!
I guess I just have to remember: use 4 dots, never 3.
</rant>
Armin
More information about the pypy-dev
mailing list