Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. class Base(object):
  2.  
  3. def __init__(self, username=None, password=None, start_url=None):
  4. self.username = username
  5. self.password = password
  6. self.start_url = start_url
  7.  
  8. class Subclass(Base):
  9.  
  10. def __init__(self, username="hoss_it87", password="whatsgoodSO", start_url="www.boss-sauce.com"):
  11. super(Subclass, self).__init__()
  12.  
  13. In [12]: x = Base('myuser', 'mypassword', 'www.google.com')
  14.  
  15. In [13]: x.username
  16. Out[13]: 'myuser'
  17.  
  18. In [14]: x.start_url
  19. Out[14]: 'www.google.com'
  20.  
  21. In [15]: y = Subclass()
  22.  
  23. In [16]: y.username
  24.  
  25. In [17]: y.start_url
  26.  
  27. In [18]: y.password
  28.  
  29. In [19]:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement