Inconsistency in dictionary behaviour: dict(dict) not calling __setitem__
Fredrik Lundh
fredrik at pythonware.com
Tue Dec 12 13:39:11 EST 2006
Almad wrote:
> However, when constructing dictionary with dictionary in constructor
> like d = RegisterMap({'k':'v'}), __setitem__ is not called
why should it do that? dict() is a concrete implementation, not a
template class for the creation of dict-like objects.
> Or should this be considered as minor bug in Python?
no.
</F>
More information about the Python-list
mailing list