[Python-Dev] PEP 422: Simpler customisation of class creation (original) (raw)

Ethan Furman ethan at stoneleaf.us
Sun Sep 15 16:19:32 CEST 2013


Three questions:

Would the new initclass function be usable with actual full-blown metaclasses?

The PEP says this:

If present on the created object, this new hook will be called by the class creation machinery after the class reference has been initialised.

Given that statement, and this example:

 class A:
     def __initclass__(cls):
         # do stuff

 class B(A):
     pass

am I correct that A's initclass will not run when B is created?

Where are we at with being ready for pronouncement?

-- Ethan



More information about the Python-Dev mailing list