Why tuple with one item is no tuple
Jeremy Bowers
jerf at jerf.org
Wed Mar 16 16:01:47 EST 2005
On Wed, 16 Mar 2005 17:28:51 -0800, James Stroud wrote:
> On Wednesday 16 March 2005 04:45 pm, Robert Kern wrote:
>> > This would be very unambiguous.
>>
>> Not entirely.
>>
>> > Then, the purity would manifest itself the naked comma being an empty
>> > tuple. Think about the zen of:
>> >
>> > ,
>>
>> Is that a tuple or grit on my monitor? :-)
>
> OK, OK, I'll give up on the commas. Maybe we should just use dollar signs :?
No, using symbols like that is bad. Clearly we need a new parser constant,
THE_ZERO_LENGTH_EMPTY_TUPLE.
We will, of course, have to forbid assigning any other name to that
constant (more language changes) so that people don't start creating their
own inconsistent name... *especially* shorter ones.
More information about the Python-list
mailing list