Created
March 23, 2016 16:38
-
-
Save dboyliao/fb730dfacfc5dc527679 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
class ParentA(object): | |
def __init__(self): | |
super(ParentA, self).__init__() | |
self.a = "parent a" | |
class ParentB(object): | |
def __init__(self): | |
super(ParentB, self).__init__() | |
self.b = "parent b" | |
class Child(ParentA, ParentB): pass | |
c = Child() | |
print(c.a) | |
# >>> "parent a" | |
print(c.b) | |
# >>> "parent b" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment