1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
>>> @memoize def func(a, b): print "%s + %s" % (a, b) return a + b >>> func(1, 5) 1 + 5 <<< 6 >>> func(1, 6) 1 + 6 <<<< 7 >>> func(1, 5) <<< 6