[Python-3000] PEP-3125 -- remove backslash continuation
tim.peters at gmail.com
Wed May 2 22:30:16 CEST 2007
>> OTOH, the "open bracket" rule is certainly sufficient by itself, and
>> is invaluable for writing "big" list, tuple, and dict literals (things
>> I doubt come up in Andrew's EFL inspiration).
> If comma is treated as an operator, the "open bracket" rule doesn't seem all
> that invaluable to me. Can you give me an example?
Treating comma as an infix operator would clash in weird ways with the
current "sometimes" treatment of comma as denoting a tuple literal ...
and I see that Giovanni Bajo already posted an example while I was
typing this :-) Icon doesn't have this problem, and I'm guessing that
EFL doesn't either.
Incidentally, I know one Python programmer who writes list literals like this:
mylist = [
In a fixed-width font, the commas and brackets are all in the same
column. While "bleech" is the proper reaction ;-), that does work
Historical note: the open bracket rule was introduced in Python 0.9.9
(29 Jul 1993). Before that, backslash continuation was the only way
to split a statement across lines. If the open bracket rule had been
there from the start, I doubt backslash continuation would have been
there at all (except in string literals).
More information about the Python-3000