[Python-Dev] Pre-PEP: Allow Empty Subscript List Without Parentheses
Nicko van Someren
nicko at nicko.org
Fri Jun 9 19:01:03 CEST 2006
On 9 Jun 2006, at 17:44, Guido van Rossum wrote:
> This is an elaborate joke, right?
>
> On 6/9/06, Noam Raphael <noamraph at gmail.com> wrote:
...
>> It's simply this: Currently, the expression "x[]" is a syntax
>> error. I
>> suggest that it will be a valid syntax, and equivalent to "x[()]",
>> just as "x[a, b]" is equivalent to "x[(a, b)]" right now.
...
>> Motivation
>> ==========
>>
>> This suggestion allows you to refer to zero-dimensional arrays
>> elegantly.
I don't think that this suggestion is any less reasonable the the
very existence of zero-dimensional arrays in the first place,
although in my personal opinion that's a fairly low bar.
Nicko
More information about the Python-Dev
mailing list