Skip to content

Instantly share code, notes, and snippets.

@magcius
Created November 10, 2015 22:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magcius/d2ebfe16d307c16e3edf to your computer and use it in GitHub Desktop.
Save magcius/d2ebfe16d307c16e3edf to your computer and use it in GitHub Desktop.
class Foo(object):
def __init__(self, what):
self.what = what
def butts(self):
def inner_butts(self, t):
if t == 0:
return self.what
else:
return t + inner_butts(self, t-1)
return inner_butts(self, 10)
def __del__(self):
print "Cleaning up"
print "A"
print Foo(20).butts()
print "B"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment