Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- # Author: SunGyo Kim
- # Email: Kimsg1984@gmail.com
- # irc.freenode #ubuntu-ko Sungyo
- class Home():
- location = "집"
- pass
- class Office():
- def sample_method(self, home):
- return home.location
- print Home.location
- def sample_mathod2(self):
- self.location = "마당"
- print self.location
- test_home = Home()
- test_office = Office()
- print test_office.sample_method(test_home)
- print Home.location
- # print test_office.sample_mathod2.location
- # # print Office.location
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement