Created
February 16, 2012 23:25
-
-
Save sekimura/1848716 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INC = 'hoho' | |
class Foo(object): | |
def __init__(self): | |
self._mock = INC | |
def __del__(self): | |
print self | |
if self._mock == INC: | |
print 'got hoho', self._mock, INC | |
else: | |
print 'no hoho' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from foo import Foo | |
if __name__ == '__main__': | |
while True: | |
f = Foo() | |
time.sleep(1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment