[issue6830] Some uniformness in defaultdict
report at bugs.python.org
Thu Sep 3 14:19:36 CEST 2009
Georg Brandl <georg at python.org> added the comment:
This won't change -- the argument of defaultdict is simply a callable
that is called with no arguments and returns the default value.
It works with `int` because `int()` can be called without arguments and
yields 0; however, `defaultdict` cannot. Therefore, the lambda
expression you wrote is one of the correct ways to spell this.
resolution: -> wont fix
status: open -> closed
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list