compatibility problem

Chad Scherrer chad.scherrer at pnl.gov
Wed Apr 16 15:16:55 EDT 2003


I'm having a compatibility problem, and I'm wondering if anyone might
be able to point me in the right direction. I'm running some code was
written for python 2.1, and I'd like to make it run under 2.2, so I
can subclass built-in types. The code is about 15,000 lines, with lots
of different classes running around, but the gist of the problem is
finding a solution set to an equation based on input from a file.
Python 2.1 gives the correct solution, but somehow 2.2.2 is only
giving me a subset. Not only that, but the order is different! The
ordering is arbitrary anyway, but I would still expect it to be
consistent between the two.

So I'm wondering what I should look for to make this work under 2.2.2.
My first thought was nested scopes, but the PEP I read suggests that
Python 2.1 gives a warning for any case that might cause a problem in
2.2. I don't think it could be the method resolution order, because
object (or any built-in type) is never subclassed. Is there anything
else I should be looking out for?

Thanks,
Chad Scherrer




More information about the Python-list mailing list