Re: [Python-ideas] allow line break at operators

Yingjie Lan writes:
Possibly, but now you have a problem that a dedent has ambiguous meaning. It might mean that you're ending a suite, or it might mean you're ending a continued expression. This probably can be disambiguated, but I don't know how easy that will be to do perfectly, including in reporting ill-formed programs.
Most people seems to like an indentation on the continuing lines,
Most of the time, yes, but sometimes not. For example, in generating text, it's often useful to dedent substantially so you can have a nearly normal length line in the literal strings being concatenated. Or you might have a pattern like this: x = long_named_variable_a - long_named_variable_a_base + long_named_variable_b - long_named_variable_b_base which your parser would raise an error on, I presume. That's not freedom!<wink />
participants (1)
-
Stephen J. Turnbull