inclusive-lower-bound, exclusive-upper-bound (was Re: Range Operation pre-PEP)
Tim Peters
tim.one at home.com
Tue May 15 21:13:42 EDT 2001
[Greg Ewing]
> * Allow implicit line continuations anywhere you have what
> is obviously a syntactically incomplete structure (e.g.
> an expression ending with a binary operator).
[Andrew Maizels]
> I've thought about that, but I'm not sure how well this will fly with
> the average programmer. I think Icon does this.
Yes, Icon does. Works very well! Especially if you leave the useless "unary
+" out of the language, so that
i = 3
+ 2
doesn't get interpreted as two separate stmts, but as one stmt followed by a
syntax error.
Note that Python used to require explicit continuation on every continued
line. Implicit continuation was added later (when in the midst of an
unclosed bracketing-- ({[ --structure). That change was more popular even
than adding ">>" to "print" <wink>.
The odd thing is you can't win: people will screw up no matter what you do
about this, until there's a smart language-aware editor.
More information about the Python-list
mailing list