[Python-3000] Line continuation using ellipsis (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Apr 14 04🔞42 CEST 2007


Steven Bethard wrote:

Just like everywhere else, you can use parentheses:

assert True, ( ... 'ASDF')

Yes, but you have to put the opening paren in a somewhat awkward place to get it to work.

Seems to me it would be much more intuitive to use what Haskell calls the "offside rule", i.e. anything indented more than the beginning of a statement is part of that statement.

The only drawback might be that an indentation error could lead to something being interpreted in an unintended way. But I suspect it would result in a syntax error in most situations.

-- Greg



More information about the Python-3000 mailing list