Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Base(object):
- dr = None
- def __init__(self, driver):
- global dr
- dr = driver
- class One(Base):
- def fun(self):
- print(dr)
- if __name__=="__main__":
- driver = 1
- test = One(driver)
- test.fun()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement