Guest User

Untitled

a guest
Feb 27th, 2014
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. >>> class Dummy:
  2. ... _instance  = None
  3. ... __instance = None
  4. ...
  5. >>> a = Dummy()
  6. >>> getattr(a, '_instance', 'oops')
  7. >>> getattr(a, '__instance', 'oops')
  8. 'oops'
  9. >>> getattr(a, '_Dummy__instance', 'oops')
Advertisement
Add Comment
Please, Sign In to add comment