homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, lyricconch
Date 2011年07月02日.08:31:11
SpamBayes Score 0.011504081
Marked as misclassified No
Message-id <1309595472.0.0.288482265636.issue12473@psf.upfronthosting.co.za>
In-reply-to
Content
-1. Besides compatibility issues, defaultdict is a dict: it contains data, and is not meant to consume CPU when accessing items. Its "default" function should return initial values, like 0 or an empty list.
I think what you want is "memoization"; a memoized function still looks like a function! there are many implementations for python, one of these is here: http://wiki.python.org/moin/PythonDecoratorLibrary#Memoize 
History
Date User Action Args
2011年07月02日 08:31:12amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, lyricconch
2011年07月02日 08:31:11amaury.forgeotdarcsetmessageid: <1309595472.0.0.288482265636.issue12473@psf.upfronthosting.co.za>
2011年07月02日 08:31:11amaury.forgeotdarclinkissue12473 messages
2011年07月02日 08:31:11amaury.forgeotdarccreate

AltStyle によって変換されたページ (->オリジナル) /