[Python-Dev] defaultdict proposal round three

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Feb 21 00:19:36 CET 2006


Guido van Rossum wrote:

> I see two alternatives.

Have you considered the third alternative that's been
mentioned -- a wrapper?

The issue of __contains__ etc. could be sidestepped by
not giving the wrapper a __contains__ method at all.
If you want to do an 'in' test you do it on the
underlying dict, and then the semantics are clear.

Greg


More information about the Python-Dev mailing list