Hello,

I just saw this PEP. There is a bit of overlap between PEP 573 and PEP 575 since these both change the calling convention for built-in methods. In particular, PEP 575 also proposes to add a "defining class" member (for different reasons). In PEP 575, this is added to the PyCFunction struct itself instead of a separate struct PyCMethod.

It would be nice to justify whether you really need a new class (PyCMethod_Type) to support METH_METHOD. It looks strange to me that the class of some object depends on an implementation detail like whether METH_METHOD is specified.

The current PEP 573 implies that backwards compatibility concerns would arise every time that METH_METHOD is added to an existing method. People have asked questions on PEP 575 about that: it would break code depending on "types.BuiltinFunctionType" for example. You could instead just change PyCFunctionObject to add that field (that's what I did in PEP 575).

For practical reasons, it would be nice to implement PEP 573 and PEP 575 together as they affect the same code (assuming that both PEPs are accepted of course).


Jeroen.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to