Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Collection():
- def __init__(self, db):
- self.x = db
- def printDbName(self):
- print self.x
- parent = Collection('hkpr')
- parent.printDbName()
- class Document(Collection):
- def __init__(self, db):
- self.db = db
- Collection.__init__(self, self.db)
- def printChild(self):
- print self.x
- child = Document('yabba')
- child.printChild()
- child.printDbName()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement