Skip to content

Instantly share code, notes, and snippets.

@dboyliao
Created March 23, 2016 16:38
Show Gist options
  • Save dboyliao/fb730dfacfc5dc527679 to your computer and use it in GitHub Desktop.
Save dboyliao/fb730dfacfc5dc527679 to your computer and use it in GitHub Desktop.
#!/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