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

Chris Barker chrishbarker at home.net
Wed Jul 25 12:59:23 EDT 2001


James Logajan wrote:

> But, but, Python ALREADY relies on file name suffixes! The "import"
> statement:
> 
> import <module>
> 
> snip snip
 
> That is it; I can think of some minor objections or esthetic complaints, but
> can't see any show stoppers unless I basically misunderstand some Python
> internals.

I thought I made this clear already, and it has been repeated in various
other threads:

A lot of python code is not in *.py files, and not run with the import
statement. It is in dhtml, or a database, or an embedded script, or.....
and run with exec or eval or execfile, or...

For this reason, there needs to be a version identifier in the code for
this scheme to work.

-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