[issue12473] factory func of collections.defaultdict should receive the "missing key" as args when called.
HaiYun Yan
report at bugs.python.org
Sat Jul 2 09:21:10 CEST 2011
New submission from HaiYun Yan <lyricconch at gmail.com>:
for example:
def calc(params):
""" i am factoring numbers. """
# an expensive CPU cost function but
# passin params and return result are both lightweight
cachedcalc = collections.defaultdict(calc)
result = cachedcalc[0xFFFFFFFFFFFFFFFFFFF0AC0FFF1]
----------
components: Library (Lib)
messages: 139624
nosy: lyricconch
priority: normal
severity: normal
status: open
title: factory func of collections.defaultdict should receive the "missing key" as args when called.
type: behavior
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12473>
_______________________________________
More information about the Python-bugs-list
mailing list