[Python-ideas] OrderedDict for kwargs and class statement namespace

Christian Heimes christian at python.org
Thu Feb 28 20:30:33 CET 2013


Am 28.02.2013 11:15, schrieb Eric Snow:
> Just wanted to put out some feelers for the feasibility of these two
> features:
> 
> * have the **kwargs param be an OrderedDict rather than a dict
> * have class definitions happen relative to an OrderedDict by default
> rather than a dict, and still overridable by a metaclass's __prepare__().
> 
> Both of these will need OrderedDict in C, which is getting close (issue
> #16991).

Raymond was/is working on a modification of the dict's internal data
structure that reduces its memory consumption. IIRC the modification
adds partial ordered as a side effect. The keys are ordered in insertion
order until keys are removed.

http://mail.python.org/pipermail/python-dev/2012-December/123028.html

Christian




More information about the Python-ideas mailing list