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/023614.html below:

[Python-Dev] Making None a keyword

[Python-Dev] Making None a keyword [Python-Dev] Making None a keywordM.-A. Lemburg mal@lemburg.com
Fri, 26 Apr 2002 09:58:36 +0200
Guido van Rossum wrote:
> 
> I'd like to make None a keyword.  This prevents dumb users from
> assigning to it and screwing themselves, and can cause a slight
> speedup because using None avoids two dict lookups.
> 
> - Any objections?

+1 but only if you use the standard mechanism for this:
warnings in 2.3, SyntaxError in 2.4.
 
> - Can somebody help me implement this?  I've got the parser changes
>   ready, but not the compiler changes.
> 
> Believe it or not, Zope3 contains code that will break with this
> change: there are functions with a default argument of the form
> None=None as a speedup hack.  I think this is an argument *for* the
> change. :-)

Zope3 is not the only software using these kind of hacks
to work around the builtins lookups.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/




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