Created
April 19, 2013 17:09
-
-
Save mattmakesmaps/5421722 to your computer and use it in GitHub Desktop.
Garbage in, Garbage out?
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
class tester(object): | |
def __init__(self, val): | |
self.val = val | |
print 'created in %s' % self.val | |
def __del__(self): | |
print 'deleted' | |
cache = {} | |
def f1(): | |
print 'in f1' | |
t = tester('f1') | |
cache['tdict'] = t | |
def f2(): | |
print 'in f2' | |
print type(cache['tdict']) | |
f1() | |
f2() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment