
On Mon 21Mar15 12:30, Jonathan Fine wrote:
Hi Roland
You're correct. Sometimes in Python there's no symmetry between beginning and end. This is I think because we read Python code top-down rather than bottom-up. And as it happens, the compiler and other data processing tools usually start at the beginning of the file.
(1) Here's something you might not have thought of
(1) 1 (1,) (1,)
You're asking for
(,1) (1,)
This side effect is logically OK, I think. Function parameters are a tuple plus possibly a dict. And if we have x = (,1) x = ,1 it is also a tuple. They are equivalent to the current x = (1,) x = 1,
(2)Now for some asides. The https://en.wikipedia.org/wiki/Arrow_of_time says that the arrow of time
the concept positing the "one-way direction" or "asymmetry" of time. It was developed in 1927 by the British astrophysicist Arthur Eddington, and is an unsolved general physics question.
For me time is a tagging of changes. Without changes no time. Independent changes, independent tags, independent times. Changes are on states. Here the state could be the lines with starting comma. The change takes less time, if I don't need to change the comma, when changing the order of the lines. The time/tagging of the parser is a completely different time.
(3) The Elm language uses leading commas on the second and subsequent items on a list. Here's some Elm code that's gone through the elm-format command. (It's analogous to Python's black.)
I don't know elm, so I cannot comment.
(4) Finally, here is an Elm bug that I happened to raise a few hours earlier. It's: Malformed record modify `{ key | }` creates EXTRA COMMA error https://github.com/elm/compiler/issues/2181
This elm bug does not seem to be related to the topic here.