[issue9536] defaultdict doc makes incorrect reference to __missing__ method

John Posner report at bugs.python.org
Sun Aug 8 16:40:24 CEST 2010


John Posner <jjposner at optimum.net> added the comment:

I think it would be confusing to create of subclass of defaultdict, defining a __missing__ method in that subclass. The existence of the __missing__ method would cancel the main functionality of the defaultdict object: invoking the "default value factory" callable.

I think it would be better to encourage programmers to subclass dict directly, instead of subclassing defaultdict.

----------
status: pending -> open

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9536>
_______________________________________


More information about the Python-bugs-list mailing list