Backwards emulation rather than backwards compatibility?

James T. Dennis jadestar at idiom.com
Mon Jun 10 02:04:35 EDT 2002


John Roth <johnroth at ameritech.net> wrote:


> "Martin v. Loewis" <martin at v.loewis.de> wrote in message
> news:m3it5cp8hj.fsf at mira.informatik.hu-berlin.de...
>> Antaeus Feldspar <feldspar at ix.netcom.com> writes:
>>
>>> Could the python interpreter be equipped with a mode that would
> allow it to emulate past interpreters?

 Why emulate, why not exec the old interpreter with the open filehandle
 of the script that's to be interpreted?

>> No, that won't be possible. It is easy enough to install multiple
>> versions of the interpreter, though.

 Ever since I saw "from __future__ import" I've thought that Python
 was crying out for a "from __past__ import"

 ... though I have no real idea what that would mean.

 (The big issue would be when you want to mix modules; run a 1.5.2 
 module in a 2.x interpreter, etc.  If there was a good "conduit" to
 pass data between the two interpreters it might work (though we'd
 have two processes, and the "newer" version would be responsible for
 pickling up objects and passing them through some IPC to be unpickled
 on the other side; and some objects (generators) would have to be 
 passed as proxies (the other side would call on them; pass the arguments
 back to the other intpreter and get the results back.

 This is probably technical possible, but I'm not sure the idea is worth
 any effort; it probably would have inevitable limitations that would make
 it less than transparent --- at which point upgrading the programs and 
 modules to be compatible with the new version looks more attractive.




More information about the Python-list mailing list