Op 24-11-15 om 17:56 schreef Ian Kelly:

> 
>> So on what grounds would you argue that () is not a literal.
> 
> This enumerates exactly what literals are in Python:
> 
> https://docs.python.org/3/reference/lexical_analysis.html#literals
> 
> I think it's a rather pedantic point, though. How are nuances of the
> grammar at all related to user expectations?
> 

I think that enumaration is too limited. The section starts with:

   Literals are notations for constant values of some built-in types.

() satisfies that definition, which is confirmed by the byte code
produced for it.

-- 
Antoon.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to