[Python-Dev] OrderedDict(kwargs) optimization?
wes.turner at gmail.com
Wed Nov 8 10:31:23 EST 2017
On Wednesday, November 8, 2017, Guido van Rossum <guido at python.org> wrote:
> It seems there must be at least two threads for each topic worth
> discussing at all. Therefore I feel compelled to point to
> where I state my own conclusion about dict order.
> Finally: the dict type should not be endowed with other parts of the
> OrderedDict API, not should other API changes to dict be considered.
Is there an opportunity to support a fast cast to OrderedDict from 3.6 dict?
Can it just copy .keys() into the OrderedDict linked list?Or is there more
overhead to the transition?
That'd be great for preserving kwargs' order after a pop() or a del?
kwargs = OrderedDict(kwargs)
arg2 = kwargs.pop('arg2')
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev