[Python-Dev] PEP 487: Simpler customization of class creation
Guido van Rossum
guido at python.org
Mon Jun 20 12:48:34 EDT 2016
On Thu, Jun 16, 2016 at 3:24 PM, Nikita Nemkin <nikita at nemkin.ru> wrote:
> 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>
> > 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 scenarios.
> Not to mention memory usage reduction and dict operations speedup...
That idea is only vastly superior if we want to force all other Python
implementations to also have an order-preserving dict with the same
semantics and API.
I'd like to hear more about your metaprogramming scenarios -- often such
things end up being code the author is ashamed of. Perhaps they should stay
in the shadows? Or could we do something to make it so you won't have to be
ashamed of it?
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev