
On 3/16/21 8:22 AM, Roland Puntaier via Python-ideas wrote:
On Mon 21Mar15 15:18, Paul Bryan wrote:
On Mon, 2021-03-15 at 11:13 +0100, Roland Puntaier via Python-ideas wrote:
I hesitate to call this proposal a language change. It is rather a syntactic allowance, like that of the trailing comma before the terminating token.
If implemented, such a proposal would in fact require a change to the language specification.
Yes. What I meant is, that it is minor, equivalent to the `,]` change.
Can `x=[,1,2]` possibly be used for some future language feature, liking making `[,` a operator of its own? Considering that one has already decided that `,]` will not be allowed to have a separate meaning in the future, then, so should neither `[,`.
It would be helpful to me to understand what friction you're currently experiencing without such a change. I'm still struggling to appreciate what the benefit would be, beyond aesthetic preference.
I'd like to write
def my_long_function_name( , my_long_option_2 = "some default expression 1".split() , my_long_option_1 = "some default expression 1".split() ): pass
Then, I'd like to change the order of the lines without having to care to remove and add a comma.
To allow `,]` was motivated by aesthetic preferences (PEP8). To allow both `[,`, and `,]` is aesthetically more neutral.
So, the proposal is based on the already done `,]` language feature. The proposal adds some syntactic flexibility, which avoids errors in situations like the one described.
My thought is that there is a line in the Zen
There should be one-- and preferably only one --obvious way to do it. That says that the langauge doesn't desire to be aesthetically neutral, but will intentionally choose a preferred way to do something. Other ways may be possible, if there is a good reason (and sometimes that is just due to backwards compatibility when a better way to do something in discovered).
This rule is even literally baked into the language due to 'import this' I think this means you need a stronger motivation than you just want another way to do the same thing, -- Richard Damon