Christophe schrieb: > André Thieme a écrit : >> You don't even need to say 'function >> (memoize function) would be enough. >> And yes, you can memoize functions while the program is running. >> And you don't need a tool like slime for it. Lisp already offers ways >> for doing that. > > In Python while the program is running : > > import module > module.function = memoize(module.function)
Yes, I mentioned that a bit earlier in this thread (not about the "during runtime" thing). I also said that many macros only save some small bits of code. Your python example contains 4 tokens / brain units. The Lisp version only has 2. In the first moment one might want to say: "Hey, just 10-15 more characters to type in Python". But this sums up. If someone *really* thinks this extra typing is not bad, why doesn't this person add some functions like: def foobar(): pass and call them from time to time? If a bit of extra typing is not bad one could call this function each time before one uses the built in * operator. Why not? André -- -- http://mail.python.org/mailman/listinfo/python-list