Namespaces are one honking great idea

Ethan Furman ethan at stoneleaf.us
Mon Jul 4 00:01:42 EDT 2016


On 07/03/2016 03:02 PM, Kevin Conway wrote:
 >At some point earlier Ethan Furman declared:

>> It's not a language change.
>
> Perhaps. My argument is that anything that introduces a new class-like
> construct and set of lexical scoping rules is a language change. For
> example, if this change went into 2.7.13 would Jython suddenly be broken
> because it hasn't implemented the new scoping rules?

It's not a language change*.  There is nothing for Jython, IronPython, 
Brython, etc., to implement.  No scoping rule changes, nothing.  The 
magic in Steven's name space is implemented by the metaclass by 
(presumably) rebuilding all the functions -- and that is how he manages 
the effective scoping rules.

--
~Ethan~


*Okay, it is not a language change the same way the addition of Enum was 
not a language change.  On the other hand, asyncio did have some 
language changes (await, async, etc.).



More information about the Python-list mailing list