Advertisement
Guest User

Untitled

a guest
Jan 24th, 2013
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. class BaseClass(object):
  2.   def commonFunction(self):
  3.     print "tjenis"
  4.  
  5. class A_1(BaseObject):
  6.   def __init__(self):
  7.     self.name = "class A 1"
  8.  
  9. class B_1(BaseObject):
  10.   def __init__(self):
  11.     self.name = "class B 1"
  12.  
  13. myClassName = "B_1"
  14. myObject = myClassName()
  15.  
  16. print myObject.name
  17. myObject.commonFunction()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement