Guest User

Untitled

a guest
May 22nd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. class SimpleEcho(WebSocket):
  2.  
  3. times_played_since_reset = 0
  4.  
  5. def handleMessage(self):
  6. global times_played_since_reset
  7. print times_played_since_reset
  8.  
  9. class Foo(object):
  10. bar = 1
  11.  
  12. >>> x = Foo()
  13. >>> y = Foo()
  14.  
  15. >>> x.bar
  16. 1
  17. >>> y.bar
  18. 1
  19.  
  20. >>> Foo.bar += 1
  21.  
  22. >>> x.bar
  23. 2
  24. >>> y.bar
  25. 2
  26.  
  27. >>> x.bar = 7
  28. >>> Foo.bar +=1
  29.  
  30. >>> x.bar
  31. 7
  32. >>> y.bar
  33. 3
  34.  
  35. class Foo(object):
  36. bar = [1]
  37.  
  38. (Class Name).variable
  39.  
  40. SimpleEcho.times_played_since_reset
Add Comment
Please, Sign In to add comment