A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-April/023825.html below:

[Python-Dev] Making None a keyword

[Python-Dev] Making None a keywordGreg Ewing greg@cosc.canterbury.ac.nz
Tue, 30 Apr 2002 16:13:53 +1200 (NZST)
Guido:

> atom: '(' [testlist] ')' | '[' [listmaker] ']' | '{' [dictmaker] '}'
>   | '`' testlist '`' | NAME | NUMBER | STRING+ | 'None'
> 
> It needs to add 'None' as an alternative to all other places where
> currently NAME occurs.

Wait a minute, you're going about this all wrong!

Instead of making None a reserved word, why not just make it
a non-reserved keyword when used as a variable name? Then
you wouldn't have to change the grammar at all, and there
would be no problem with the use of None in other contexts,
such as attribute names.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4