Georg Brandl <ge...@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. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6830> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com