# HG changeset patch # User Jeff Hammel # Date 1380050963 25200 # Node ID d6f535ef4bdc82027996d00c73a7b1af91a8f3ed # Parent 33d7d276b1b97d94cf5d62c1befd818989072ed1 -> example diff -r 33d7d276b1b9 -r d6f535ef4bdc python/deldel.py --- a/python/deldel.py Mon Sep 23 00:56:02 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -#!/usr/bin/env python - -class Foo(object): - def __call__(self, string): - print string - def __del__(self): - print "Deleting" - -foo = Foo() -foo("You will see deleting") -del foo - -foo = Foo() -del Foo.__del__ -foo("And now you won't") -del foo diff -r 33d7d276b1b9 -r d6f535ef4bdc python/example/deldel.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/python/example/deldel.py Tue Sep 24 12:29:23 2013 -0700 @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +class Foo(object): + def __call__(self, string): + print string + def __del__(self): + print "Deleting" + +foo = Foo() +foo("You will see deleting") +del foo + +foo = Foo() +del Foo.__del__ +foo("And now you won't") +del foo