Looking for magic method to override to prevent dict(d) from grabbing subclass inst d contents directly

Bengt Richter bokr at oz.net
Tue Nov 22 01:33:44 EST 2005


Has anyone found a way besides not deriving from dict?
Shouldn't there be a way?
TIA
(need this for what I hope is an improvement on the Larosa/Foord OrderedDict ;-)

I guess I can just document that you have to spell it dict(d.items()), but I'd
like to hide the internal shenanigans ;-)

Regards,
Bengt Richter



More information about the Python-list mailing list