Backwards emulation rather than backwards compatibility?

John Roth johnroth at ameritech.net
Sun May 26 08:22:06 EDT 2002


"Neil Hodgson" <nhodgson at bigpond.net.au> wrote in message
news:NyVH8.177231$o66.530359 at news-server.bigpond.net.au...
> John Roth:
>
> > Also, it should be possible to mix levels in one program,
> > the limitation being that any one module is interpreted
> > under one set of rules.
>
>    Some of the language changes affect communication between modules.
How do
> you deal with changes in the language that affect the interface
provided by
> one module and consumed by another with a different language level?
Say I
> have some 1.52 code that uses introspection and point it at a 2.2
module
> that uses the new property support?

It must return what the 1.5.2 code expects.

> Or a 1.52 module asked to deal with
> Unicode?

It would probably fail, since 1.5.2 doesn't support Unicode. Of course,
there are some methods on a unicode string (such as __len__) that
would work, but in general, if the method didn't exist, why is the old
code calling it?

>    While most dependencies are of the form of new code using old code,
it is
> common for this use to include subclassing old code and other forms
where
> 'use' is really bidirectional.
>
>    To me, providing a language level feature looks like a huge time
sink,
> with a need for exhaustive pairwise (at least!) cross level testing.
>
>    Neil
>
>
>





More information about the Python-list mailing list