DodaCoda

Untitled

Dec 8th, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3.  
  4. # Author: SunGyo Kim
  5. # irc.freenode #ubuntu-ko Sungyo
  6.  
  7.  
  8. class Home():
  9. location = "집"
  10. pass
  11.  
  12. class Office():
  13. def sample_method(self, home):
  14. return home.location
  15. print Home.location
  16.  
  17. def sample_mathod2(self):
  18. self.location = "마당"
  19. print self.location
  20.  
  21.  
  22.  
  23.  
  24. test_home = Home()
  25. test_office = Office()
  26.  
  27. print test_office.sample_method(test_home)
  28. print Home.location
  29. # print test_office.sample_mathod2.location
  30. # # print Office.location
Advertisement
Add Comment
Please, Sign In to add comment