On 2018年07月30日 15:35, INADA Naoki wrote:
Can you be more concrete what you find complicated? Maybe I can improve the PEP to explain it more. Also, I'm open to suggestions to make it less complicated.As repeatedly said, PEP 580 is very complicated protocol when just implementing callable object.
It is optimized for implementing custom method object, although almost only Cython want the custom method type.
For the record, Numba also seems interested in the PEP: https://groups.google.com/a/continuum.io/d/msg/numba-users/2G6k2R92MIM/P-cFKW7xAgAJ
I recall my post https://mail.python.org/pipermail/python-dev/2018-July/154238.html explaining the main difference between PEP 576 and PEP 580. I would like to stress that PEP 580 was designed for maximum performance, both today and for future extensions (such as calling with native C types).I'm not sure adding such complicated protocol almost only for Cython. If CyFunction can be implemented behind PEP 576, it may be better.
I don't think that this is a good idea: you will mostly end up with the disadvantages of both approaches.* PEP 576 and 580 are not strictly mutually exclusive; PEP 576 may be accepted in addition to PEP 580
Jeroen. _______________________________________________ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com