Hi,

Since Erlend and me posted PEP 670 on python-dev last October, we took
all feedback (python-dev and Steering Council) in account to clarify
the intent of the PEP and to reduce its scope (remove *any* risk of
backward compatibility).

PEP 670: https://python.github.io/peps/pep-0670/

Changes since the first version:

* Stricter policy on not changing argument types and return type.
* Better explain why pointer arguments require a cast to not emit new
compiler warnings.
* Macros which can be used as l-values are no longer modified by the
PEP (I wrote PEP 674 just for that).
* Macros having multiple return types are no longer modified by the PEP.
* Limited C API version 3.11 no longer casts pointer arguments (move
towards a cleaner API, but only if you opt in for that!).
* No longer remove return values of macros "which should not have a
return value" (this rule was complicated and in fact, all macros have
already been fixed).
* Add "Macros converted to functions since Python 3.8" section to show
that macros already converted didn't introduce performance issue nor
new compiler warnings.
* Add "Benchmark comparing macros and static inline functions" section
to prove that there is no significant impact on performance.

Note: we already submitted PEP 670 to the Steering Council at the end
of November, and the SC 2022 came with feedback, so we modified the
PEP:
https://mail.python.org/archives/list/python-dev@python.org/message/IJ3IBVY3JDPROKX55YNDT6XZTVTTPGOP/

Following the SC decision, we already modified PEP 7 to add:

"static inline functions should be preferred over macros in new code."
https://www.python.org/dev/peps/pep-0007/#c-dialect

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/VM6I3UHVMME6QRSUOYLK6N2OZHP454W6/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to