Eric Smith <[email protected]> added the comment:
How about:
from collections import defaultdict
class defaultdict_value(defaultdict):
def __init__(self, value):
defaultdict.__init__(self, lambda : value)
x = defaultdict_value(3)
print(x[1])
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10533>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com