[Python-3000] [Python-ideas] Namespaces are one honking great idea -- let's do more of those!

Ron Adam rrr at ronadam.com
Sun Feb 3 22:09:29 CET 2008



skip at pobox.com wrote:
>     >> It won't work in this case.  Compilation of the module might well
>     >> fail because of Python2/Python3 syntax differences.
> 
>     Leif> Well, then this isn't something to be implemented for python 2,
>     Leif> it's something to consider for python 3 and greater.  
> 
> It won't work there either.  It's quite possible that a module written for
> Python 2 won't compile under Python 3.  Compilation is currently the only
> route to execution.  You'd have to come up with some other scheme.  Someone
> suggested something akin to a "from __future__" facility or the #! trick you
> and others mentioned, but that would only work for Python 2.6 and above.
> 
> Skip

The tokenizer.c file has the routines to detect encoding specifiers before 
the file is compiled.  So it could be done there right after the file 
encoding is detected.

Ron











More information about the Python-3000 mailing list