This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients docs@python, ethan.furman, ezio.melotti, jjposner, r.david.murray, rhettinger, terry.reedy
Date 2014-12-07.21:02:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1417986150.74.0.497588278431.issue9536@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-12-07 21:02:30terry.reedysetrecipients: + terry.reedy, rhettinger, ezio.melotti, r.david.murray, jjposner, docs@python, ethan.furman
2014-12-07 21:02:30terry.reedysetmessageid: <1417986150.74.0.497588278431.issue9536@psf.upfronthosting.co.za>
2014-12-07 21:02:30terry.reedylinkissue9536 messages
2014-12-07 21:02:30terry.reedycreate