Proposal for .py2, py3, etc. extensions. Was: A way to accommodate laguage changes

Chris Barker chrishbarker at home.net
Wed Jul 25 19:59:18 EDT 2001


James Logajan wrote:

> Neither scheme is 100% perfect.

Surely true

> How about using several schemes, with the following precedence:
> 
> 1) The module contains a "UsesVersion" statement to indicate the operative
> version.
> 2) The python interpreter is started with a flag to indicate the version to
> compile with.
> 3) The module name contains a suffix to indicate the operative version.

This seems to violate the "only one way to do it" principle, but maybe
it's neccesary

> P.S. When feeding eval() a string, I'm pretty sure it only takes an
> expression; not a series of statements. You can't imbed a version statement.
> So if, as you claim, there is indeed a lot of people who have string
> snippets buried in databases or elsewhere that are evaled on the fly, then I
> think that a lot of conversion pain is inevitable.

You're right about eval(). exec() and execfile() do allow a series of
statements however, but you could certainly be evaling a expression with
a "/" in it.

Anyway, none of the "powers that be" seem to be paying any attention to
this thread, so this is my last post. Guido(in another thread) did
express some interest in the *.py3 idea, however. We'll see.

-Chris



-- 
Christopher Barker,
Ph.D.                                                           
ChrisHBarker at home.net                 ---           ---           ---
http://members.home.net/barkerlohmann ---@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Oil Spill Modeling                ------   @    ------   @   ------   @
Water Resources Engineering       -------      ---------     --------    
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------



More information about the Python-list mailing list