[Python-Dev] init_subclass is a class method (Was: Make class_getitem a class method) (original) (raw)

Serhiy Storchaka storchaka at gmail.com
Fri Dec 15 18:31:52 EST 2017


16.12.17 00:48, Ivan Levkivskyi пише:

Actually documentation https://docs.python.org/3.6/reference/datamodel.html#customizing-class-creation already says classmethod object._initsubclass_(cls) I am not an expert in this, so I am not sure if the docs can be improved here (maybe we can add how this works with C API?)

Sorry, I had wrote my previous message before reading the documentation, just after reading the sources. Now I have discovered that the special behavior of init_subclass is already documented. I don't know whether it is needed to add something more.



More information about the Python-Dev mailing list