[Python-Dev] PEP 487: Simpler customization of class creation

Nikita Nemkin nikita at nemkin.ru
Thu Jun 16 18:24:15 EDT 2016

On Fri, Jun 17, 2016 at 2:36 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 16 June 2016 at 14:17, Martin Teichmann <lkb.teichmann at gmail.com> wrote:

> An implementation like PyPy, with an inherently ordered standard dict
> implementation, can just rely on that rather than being obliged to
> switch to their full collections.OrderedDict type.

I didin't know that PyPy has actually implemented packed ordered dicts!

This old idea by Raymond Hettinger is vastly superior to __definition_order__
duct tape (now that PyPy has validated it).
It also gives kwarg order for free, which is important in many metaprogramming
Not to mention memory usage reduction and dict operations speedup...

More information about the Python-Dev mailing list