[Python-ideas] Simpler Customization of Class Creation - PEP 487

Eric Snow ericsnowcurrently at gmail.com
Wed Mar 2 17:31:08 EST 2016


On Wed, Mar 2, 2016 at 12:43 PM, Martin Teichmann
<lkb.teichmann at gmail.com> wrote:
> I agree, __definition_order__ sounds better. I'm not a native speaker,
> so I need some help on naming things properly...

No worries.  Glad we agree. :)

> I am not very attached to the idea of __definition_order__, so if the
> general consensus here is to take it out, I will do that.

I'm not suggesting that you take it out, necessarily.  I just wanted
to make sure you could make an informed decision.

> I'm not sure how the general feeling is here on the list: should I
>
>   * take out the __definition_order__ and later do the same
>     with an OrderedDict,

I don't think there's any harm in leaving it in, regardless of what
I'm trying to achieve.  It would be sensible to reference issue24254
in the PEP as there's overlap (even if not in the implementation).

>   * or should I leave that in because making OrderedDict a
>     builtin is too much a burden?

As of 3.6 OrderedDict *is* a builtin type (just not part of the
builtins module).  So there's zero burden. :)

> Btw, how I want to proceed: I am currently looking how other projects
> could benefit from PEP 487 (beside my owns...), and got good feedback
> from IPython. Then I will implement a version for the standard library.

Good plan.

> As a reminder, there is already a version on PyPI:
>
> https://pypi.python.org/pypi/metaclass

Cool.  I'll take a look.

-eric


More information about the Python-ideas mailing list