accessing elements of a tuple
steve at holdenweb.com
Sun Feb 1 08:00:42 EST 2009
Steven D'Aprano wrote:
> D'Arcy J.M. Cain wrote:
>> First of all, list is a reserved word. Don't use it as a variable name.
> Unless you mean to. Shadowing built-ins is only a bad thing when you do it
> by accident.
Quite. And we should observe that "list" is not a reserved word in the
sense of a keyword with a specific syntactic meaning, otherwise it
wouldn't be possible to shadow it in the first place. It's just the name
of one of Python's built-in types.
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
More information about the Python-list