Mercurial > hg > config
comparison python/deldel.py @ 500:5af627460928
changes
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 28 Aug 2013 04:37:17 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
499:84a865a880a8 | 500:5af627460928 |
---|---|
1 #!/usr/bin/env python | |
2 | |
3 class Foo(object): | |
4 def __call__(self, string): | |
5 print string | |
6 def __del__(self): | |
7 print "Deleting" | |
8 | |
9 foo = Foo() | |
10 foo("You will see deleting") | |
11 del foo | |
12 | |
13 foo = Foo() | |
14 del Foo.__del__ | |
15 foo("And now you won't") | |
16 del foo |