Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (rigbits)lscott@qdi:~/dev/rigbits$ cat foobar.py
- class FooBar(object):
- derp = 0
- baz = 0
- def __init__(self):
- FooBar.derp += 1
- self.baz += 1
- print 'DERP', FooBar.derp, self.baz
- f1 = FooBar()
- f2 = FooBar()
- f3 = FooBar()
- f4 = FooBar()
- (rigbits)lscott@qdi:~/dev/rigbits$ python foobar.py
- DERP 1 1
- DERP 2 1
- DERP 3 1
- DERP 4 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement