# coding:utf-8
#!/usr/bin/env python

class A:
    pass

class B:

    def p(self, value):
        print value

class C(A):
    pass

if __name__ == "__main__":
    a = C()
    #a.p()   # will get error
    C.__bases__ += (B,) # dynamically change the inheriting tree
    a.p("hello")

72d4cac77650a5c6dccbc8642fe7043c2488f29b
# coding:utf-8
#!/usr/bin/env python

class A:
    pass

class B:

    def p(self, value):
        print value

class C(A):
    pass

if __name__ == "__main__":
    a = C()
    #a.p()   # will get error
    C.__bases__ += (B,) # dynamically change the inheriting tree
    a.p("hello")
