[Python-Dev] How to update namedtuple asdict() to use dict instead of OrderedDict

Raymond Hettinger raymond.hettinger at gmail.com
Thu Jan 31 00:24:41 EST 2019



> On Jan 30, 2019, at 9:11 PM, Tim Delaney <timothy.c.delaney at gmail.com> wrote:
> 
> Alternatively, would it be viable to make OrderedDict work in a way that so long as you don't use any reordering operations it's essentially just a very thin layer on top of a dict,

There's all kinds of tricks we could do but none of them are worth it.  It took Eric Snow a long time to write the OrderedDict patch and it took years to get most of the bugs out of it.  I would really hate to go through a redesign and eat up our time for something that probably won't be much used any more.

I'm really just aiming for something as simple as s/OrderedDict/dict in namedtuple :-)  


Raymond


More information about the Python-Dev mailing list