Advertisement
DodaCoda

Untitled

Dec 8th, 2014
180
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. # Email: Kimsg1984@gmail.com
  6. # irc.freenode #ubuntu-ko Sungyo
  7.  
  8.  
  9. class Home():
  10. location = "집"
  11. pass
  12.  
  13. class Office():
  14. def sample_method(self, home):
  15. return home.location
  16. print Home.location
  17.  
  18. def sample_mathod2(self):
  19. self.location = "마당"
  20. print self.location
  21.  
  22.  
  23.  
  24.  
  25. test_home = Home()
  26. test_office = Office()
  27.  
  28. print test_office.sample_method(test_home)
  29. print Home.location
  30. # print test_office.sample_mathod2.location
  31. # # print Office.location
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement