package extension problem

Miki Tebeka miki.tebeka at
Mon Feb 13 12:18:16 EST 2012

> B[some_hash] still returns an instance of the old class A, while I want 
an instance of the new class A. 
I don't understand this sentence. How does B[some_hash] related to A?

I've tried the below and it seems to work. Can you paste some code to help us understand more?

-- --
class A:

-- __
import old
class A(old.A):

-- --
import new
a = new.A()
a.__class__ # Shows new.A

More information about the Python-list mailing list