Re: List syntax (was: Re: help from the community?)

2007-02-06 Thread Douglas Philips
On 2007 Feb 5, at 6:13 AM, Ulf Norell wrote: How about instead writing ( expr , expr , expr , expr , expr ) The only extra work is when inserting an element at the beginning, but you have the same problem in your example. This a coding style issue. My point was that the syntax should not

Re: List syntax (was: Re: help from the community?)

2007-02-06 Thread Jeffrey Yasskin
On 2/5/07, Ulf Norell [EMAIL PROTECTED] wrote: On Feb 3, 2007, at 6:35 AM, Douglas Philips wrote: Well, if we're going to bring personal points of view in, it highly pisses me off that in a construct such as: ( expr , expr , expr , expr , expr , ) I have to be vigilant to

Re: List syntax (was: Re: help from the community?)

2007-02-05 Thread Ulf Norell
On Feb 3, 2007, at 6:35 AM, Douglas Philips wrote: Well, if we're going to bring personal points of view in, it highly pisses me off that in a construct such as: ( expr , expr , expr , expr , expr , ) I have to be vigilant to remove that trailing comma when it is in _no way_

Re: List syntax (was: Re: help from the community?)

2007-02-03 Thread Douglas Philips
On 2007 Feb 3, at 2:55 AM, Brian Hulley indited: Of course, but when I said error I meant error with respect to the intentions of the programmer not syntax error detected by the compiler. The problem with your proposal is that if optional trailing commas were allowed, if *I* wrote:

Re: List syntax (was: Re: help from the community?)

2007-02-03 Thread Brian Hulley
Douglas Philips wrote: On 2007 Feb 3, at 2:55 AM, Brian Hulley indited: I know, I find the need to manually delete and insert commas extremely tedious as well. This is why I proposed: ... I like that. (I haven't done enough analysis on the layout part of the grammar to personally make sure it

Re: List syntax (was: Re: help from the community?)

2007-02-03 Thread Taral
On 2/3/07, Brian Hulley [EMAIL PROTECTED] wrote: Of course, but when I said error I meant error with respect to the intentions of the programmer not syntax error detected by the compiler. The problem with your proposal is that if optional trailing commas were allowed, if *I* wrote: (1,2,)

Re: List syntax (was: Re: help from the community?)

2007-02-02 Thread Malcolm Wallace
Douglas Philips [EMAIL PROTECTED] wrote: What would be the proper way to propose that: | ( exp1 , ... , expk ) (tuple, k=2) | [ exp1 , ... , expk ] (list, k=1) be amended to: | ( exp1 , ... , expk [ , ] ) (tuple, k=2) | [ exp1 , ... , expk [

Re: List syntax (was: Re: help from the community?)

2007-02-02 Thread Brian Hulley
Douglas Philips wrote: What would be the proper way to propose that: ( exp1 , ... , expk ) (tuple, k=2) [ exp1 , ... , expk ] (list, k=1) be amended to: ( exp1 , ... , expk [ , ] ) (tuple, k=2) [ exp1 , ... , expk [ , ] ] (list, k=1) I think a problem with the above proposal is that by

Re: List syntax (was: Re: help from the community?)

2007-02-02 Thread Atze Dijkstra
On 2 Feb, 2007, at 16:55 , Malcolm Wallace wrote: Douglas Philips [EMAIL PROTECTED] wrote: What would be the proper way to propose that: | ( exp1 , ... , expk ) (tuple, k=2) | [ exp1 , ... , expk ] (list, k=1) be amended to: | ( exp1 , ... , expk [ ,

Re: List syntax (was: Re: help from the community?)

2007-02-02 Thread Douglas Philips
On 2007 Feb 2, at 11:32 AM, Brian Hulley wrote: Douglas Philips wrote: What would be the proper way to propose that: ( exp1 , ... , expk ) (tuple, k=2) [ exp1 , ... , expk ] (list, k=1) be amended to: ( exp1 , ... , expk [ , ] ) (tuple, k=2) [ exp1 , ... , expk [ , ] ] (list, k=1) I think

Re: List syntax (was: Re: help from the community?)

2007-02-02 Thread Kirsten Chevalier
On 2/2/07, Douglas Philips [EMAIL PROTECTED] wrote: I assert that the trailing comma is a feature, not a programmer forgetting the last element, and that this is already explicitly allowed, as per the syntax fragments already quoted, repeated here for convenience: -- from:

Re: List syntax (was: Re: help from the community?)

2007-02-02 Thread Douglas Philips
On 2007 Feb 2, at 12:13 PM, Kirsten Chevalier inquired: On 2/2/07, Douglas Philips [EMAIL PROTECTED] wrote: I assert that the trailing comma is a feature, not a programmer forgetting the last element, and that this is already explicitly allowed, as per the syntax fragments already quoted,

Re: List syntax (was: Re: help from the community?)

2007-02-02 Thread Kirsten Chevalier
On 2/2/07, Douglas Philips [EMAIL PROTECTED] wrote: Hmmm...stated another way: I am proposing that the list and tuple syntax change to be consistent with the import and export syntax. The argument that a trailing comma means the programmer forgot the last item in a list / tuple is inconsistent

RE: List syntax (was: Re: help from the community?)

2007-02-02 Thread Sittampalam, Ganesh
On 2/2/07, Kirsten Chevalier [EMAIL PROTECTED] wrote: On the other hand, with constant lists and tuples, you're probably not going to frequently edit the same constant list value. Am I missing something? Sometimes people maintain static configuration items and the like in lists. I've

Re: List syntax (was: Re: help from the community?)

2007-02-02 Thread Neil Mitchell
Hi The argument that a trailing comma means the programmer forgot the last item in a list / tuple is inconsistent with the deliberately explicit permissiveness of a trailing comma in the import / export lists. In the import / export lists such a trailing comma does not mean programmer forgot

Re: List syntax (was: Re: help from the community?)

2007-02-02 Thread Douglas Philips
On 2007 Feb 2, at 1:03 PM, Neil Mitchell indited: The argument that a trailing comma means the programmer forgot the last item in a list / tuple is inconsistent with the deliberately explicit permissiveness of a trailing comma in the import / export lists. In the import / export lists such a

Re: List syntax (was: Re: help from the community?)

2007-02-02 Thread Kirsten Chevalier
On 2/2/07, Douglas Philips [EMAIL PROTECTED] wrote: On 2007 Feb 2, at 1:03 PM, Neil Mitchell indited: An import list is not a value, you can't examine whats in the list, you can't enumerate it etc. As such, it doesn't really matter how many elements are in there, the important thing is what

Re: List syntax (was: Re: help from the community?)

2007-02-02 Thread Brian Hulley
Douglas Philips wrote: On 2007 Feb 2, at 1:03 PM, Neil Mitchell indited: Personally I'd make the rule that trailing commas are never allowed, anywhere, but I do see an argument for adding them to import lists. You just highlighted the inconsistency: You refer to import lists... you appear to

Re: List syntax (was: Re: help from the community?)

2007-02-02 Thread Douglas Philips
On 2007 Feb 2, at 11:25 PM, Brian Hulley indited: Apart from the extra possibility for errors (yes I understood that you'd define it to not be an error but this doesn't change the fact that for people who always wrote their tuples using the normal mathematical convention not using an

Re: List syntax (was: Re: help from the community?)

2007-02-02 Thread Brian Hulley
Douglas Philips wrote: On 2007 Feb 2, at 11:25 PM, Brian Hulley indited: Apart from the extra possibility for errors (yes I understood that you'd define it to not be an error but this doesn't change the fact that for people who always wrote their tuples using the normal mathematical convention