Terry J. Reedy added the comment:
I agree that the patch is not acceptable as is. The public attribute *defaultdict* should be explicitly documented as it is now, so that it is indexed. On the other hand, users should not directly call .__missing__, and it is not normal to document the private special method implementation of classes. For example, a collections.Counter returns 0 for missing keys but the doc makes no mention of .__missing__ as the implementation. It simply describe how a counter works.
John is correct that people writing other subclasses with __missing__ should usually subclass dict. This might be clearer if that special method were properly documented and indexed. I opened #23006 for this.
---------- nosy: +terry.reedy resolution: not a bug -> stage: resolved -> needs patch
_______________________________________ Python tracker firstname.lastname@example.org http://bugs.python.org/issue9536 _______________________________________