[Python-ideas] Re: allow initial comma

2021-04-16 Thread Hans Ginzel
On Tue, Mar 16, 2021 at 08:28:05AM -0700, Guido van Rossum wrote: Personally, I'd like to remind you that when I designed Python my ideal was to use punctuation in ways that are similar to the way it is used in plain English, with exceptions only for forms commonly found in many other

[Python-ideas] Re: allow initial comma

2021-04-16 Thread Hans Ginzel
Thank you Roland, for that idea! On Tue, Mar 16, 2021 at 01:52:48PM +0100, Roland Puntaier via Python-ideas wrote: On Mon 21Mar15 22:24, Stephen J. Turnbull wrote: Roland Puntaier via Python-ideas writes: Aesthetic Concern: No = It might seem an aesthetic concern, but I

[Python-ideas] Re: allow initial comma

2021-03-19 Thread Gerrit Holl
Hi, On Fri, 12 Mar 2021 at 15:12, Paul Moore wrote: > This layout style is not something I've ever seen used in "real life", > and I don't think it's something that should be encouraged, much less > added to the language. > More likely because there are two common schools of thought - lists >

[Python-ideas] Re: allow initial comma

2021-03-16 Thread Richard Damon
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

[Python-ideas] Re: allow initial comma

2021-03-16 Thread Guido van Rossum
Hi Roland, Can you please give up on this particular idea? You've given it a fair try, and nobody is showing any interest in changing Python to match your proposal. That's usually a good indication that it will Never Happen, and if you keep arguing beyond that point you tend to be written off as

[Python-ideas] Re: allow initial comma

2021-03-16 Thread Ned Batchelder
On 3/16/21 8:22 AM, Roland Puntaier via Python-ideas wrote: 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 Why not write this instead?: def

[Python-ideas] Re: allow initial comma

2021-03-15 Thread Todd
On Mon, Mar 15, 2021, 06:15 Roland Puntaier via Python-ideas < python-ideas@python.org> wrote: > On Fri 21Mar12 14:27, Paul Bryan wrote: > >It seems your proposal is intended to address an aesthetic concern. Is > >there a case where using a leading comma would make something > >actually easier or

[Python-ideas] Re: allow initial comma

2021-03-12 Thread Eric V. Smith
On 3/12/2021 4:42 PM, Paul Bryan wrote: Using your example (thanks, seeing a concrete example is helpful) it appears you can do it the SQL way in Python too: x = (1 ,2 ,3 ) Right. It's just that no one would want to! Eric On Fri, 2021-03-12 at 16:35 -0500, Eric V. Smith wrote: On

[Python-ideas] Re: allow initial comma

2021-03-12 Thread Paul Bryan
Using your example (thanks, seeing a concrete example is helpful) it appears you can do it the SQL way in Python too: x = (1 ,2 ,3 ) On Fri, 2021-03-12 at 16:35 -0500, Eric V. Smith wrote: > On 3/12/2021 3:37 PM, Greg Ewing wrote: > > On 13/03/21 5:02 am, Ned Batchelder wrote: > > > I think the

[Python-ideas] Re: allow initial comma

2021-03-12 Thread Eric V. Smith
On 3/12/2021 3:37 PM, Greg Ewing wrote: On 13/03/21 5:02 am, Ned Batchelder wrote: I think the only reason anyone ever used leading commas to begin with was because of languages that didn't allow a final trailing comma.  In those worlds, to keep the editing smooth, people moved the commas to

[Python-ideas] Re: allow initial comma

2021-03-12 Thread Greg Ewing
On 13/03/21 5:02 am, Ned Batchelder wrote: I think the only reason anyone ever used leading commas to begin with was because of languages that didn't allow a final trailing comma.  In those worlds, to keep the editing smooth, people moved the commas to the beginning of the line, Which

[Python-ideas] Re: allow initial comma

2021-03-12 Thread Chris Angelico
On Sat, Mar 13, 2021 at 3:28 AM <2qdxy4rzwzuui...@potatochowder.com> wrote: > For exmaple, if I have a multiline list like this: > > x = [ > 1, > 2 > ] > > and add a new element to the end, then I end up with the diff including > the 2 even though I didn't change

[Python-ideas] Re: allow initial comma

2021-03-12 Thread 2QdxY4RzWzUUiLuE
On 2021-03-12 at 11:02:50 -0500, Ned Batchelder wrote: > I think the only reason anyone ever used leading commas to begin with > was because of languages that didn't allow a final trailing comma.  In > those worlds, to keep the editing smooth, people moved the commas to > the beginning of the

[Python-ideas] Re: allow initial comma

2021-03-12 Thread Paul Moore
On Fri, 12 Mar 2021 at 16:06, Ned Batchelder wrote: > > I think the only reason anyone ever used leading commas to begin with was > because of languages that didn't allow a final trailing comma. In those > worlds, to keep the editing smooth, people moved the commas to the beginning > of the

[Python-ideas] Re: allow initial comma

2021-03-12 Thread Ned Batchelder
I think the only reason anyone ever used leading commas to begin with was because of languages that didn't allow a final trailing comma.  In those worlds, to keep the editing smooth, people moved the commas to the beginning of the line, breaking with every comma-tradition. I don't see a

[Python-ideas] Re: allow initial comma

2021-03-12 Thread Paul Bryan
It seems your proposal is intended to address an aesthetic concern. Is there a case where using a leading comma would make something actually easier or more intuitive to express over the use of trailing comma? On Fri, 2021-03-12 at 10:34 +, roland.puntaier--- via Python-ideas wrote: > I had

[Python-ideas] Re: allow initial comma

2021-03-12 Thread Paul Moore
On Fri, 12 Mar 2021 at 13:22, roland.puntaier--- via Python-ideas wrote: > > I had posted this as https://github.com/python/peps/issues/1867 > The discussion so far is below. > > Please make some arguments. > > The major point to me is, that the symmetry is broken, > which leads to extra editing