I have a class A and i want a class B with exactly the same capabilities. I cannot or do not want to inherit from B, such as doing class B(A):pass Still i want B to be ident
maybe i misunderstood you question but what about wrapping A in B?
class A: def foo(self): print "A.foo" class B: def __init__(self): self._i = A() def __getattr__(self, n): return getattr(self._i, n)