Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> class X:
- ... def xxx(self):
- ... print("hello world from: " + name)
- ...
- >>> class Y:
- ... yyy = X.xxx;
- ...
- >>> name = "josh"
- >>> name
- 'josh'
- >>> z = Y();
- >>> z.yyy();
- hello world from: josh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement