1 # This Python file uses the following encoding: utf-8
3 Created on May 12, 2011
5 a simple memoization routine
11 """replace an function without arguments with a function that merely returns the result"""
16 setattr(selv
, func
.__name
__, f2
)
20 if __name__
== "__main__":
21 """test functionality"""
23 def __init__(self
, v
):
28 print("computing %s" % (self
.__v
))