On 23. 11. 21 18:00, Victor Stinner wrote:
I completed the PEP: https://python.github.io/peps/pep-0670/


What I don't like about this PEP is that it documents changes that were already pushed, not planned ones. But, what's done is done... Are there more macros that are yet to be converted to macros, other than the ones in GH-29728? If so, can you give a list?

Since this is about converting existing macros (and not writing new ones), can you talk about which of the "macro pitfalls" apply to the macros in CPython that were/will be changed?

The "Backwards Compatibility" section is very small. Can you give a list of macros which lost/will lose "return values"? Can you add the fact that some macros now can't be used as l-values? (and list which ones?) This change is also breaking existing code. Are there any other issues that break existing code? (Even code that, for example, shouldn't work according to Python documentation, but still works fine in practice.)


The "Cast to PyObject*" section talks about adding new private functions like _Py_TYPE, which are type-safe, but keeping old names (like Py_TYPE) as macros that do a cast. Could the newly added functions be made public from the start? (They could use names like Py_Type.) This would allow languages that don't have macros to use them directly, and if the non-typesafe macros are ever discouraged/deprecated/removed, this would allow writing compatible code now.
_______________________________________________
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/TBIGFWSBOGW55DBRUYURR5QKRVIK3B6I/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to