Backwards emulation rather than backwards compatibility?

Martin v. Loewis martin at v.loewis.de
Sat May 25 21:22:34 EDT 2002


"John Roth" <johnroth at ameritech.net> writes:

> > > Could the python interpreter be equipped with a mode that would
> > > allow it to emulate past interpreters?

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

> Oh, come on now. Anything is possible, the question is whether it is
> worth doing and (this being a volunteer effort) whether anyone wants
> to do it.

To fully emulate a past implementation, you'd have to know *all* it's
features. If you fix a bug, you somehow need to be able to preserve
the old library behaviour. I see no way to do this, except
incorporating old copies of the library. Same for the interpreter
itself, so you would also need to include copies of the old
interpreter.

Doing so woul mean that the directory structure of the library will
need to change - such changes are detectable by applications, so full
backwards compatibility would not achieved.

Likewise, the mere introduction of that "mode" would cause that Python
changes its behaviour, and might cause existing applications to break.

So if you want "full emulation", I maintain that this is not possible
to implement.

If you want "partial emulation" - this feature is available today; new
versions execute much old code correctly.

Regards,
Martin




More information about the Python-list mailing list