-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PEP 670: clarify cast; don't change return type #2349
Conversation
vstinner
commented
Feb 21, 2022
•
edited
Loading
edited
- Clarify how arguments are cast
- Limited C API 3.11 no longer cast arguments
- No longer remove return value
- Require to not change the return type
- Don't change macros having multiple return types
* Clarify how arguments are cast * Limited C API 3.11 no longer cast arguments * No longer remove return value * Require to not change the return type * Don't change macros having multiple return types
I updated PEP 670 to take in account @encukou and @gpshead feedback on python-dev and on my python/cpython#31221 review. @encukou @gpshead @erlend-aasland: Would you mind to have a look? |
You can read the formatted PEP by clicking in the Files Changes tab on the 3 middle dots ( Current link: pep-0670.rst. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes for a number of grammar errors in the added/changed text, as well as a few PEP 12 issues and for correct code block syntax highlighting. All the changes are as suggestions, and can be applied cleanly together by simply going to the Files
tab, clicking the Add to batch
button on each change, and then clicking the Commit
button, which will avoid the all problems we both experienced last time. Alternatively, I'm happy to do it for you. Either way, don't forget to pull
your branch after doing so. Thanks!
* ``_Py_atomic_store_64bit()`` | ||
* ``asdl_seq_SET()`` | ||
* ``asdl_seq_SET_UNTYPED()`` | ||
For example, Python 3.7 changed ``PyUnicode_AsUTF8()`` return type from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, Python 3.7 changed ``PyUnicode_AsUTF8()`` return type from | |
For example, Python 3.7 changed ``PyUnicode_AsUTF8()``\ 's return type from |
Fix grammar error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This grammar error wasn't fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this, Victor.
@CAM-Gerlach: I addressed most of your reviews, thanks. |
Follow-up: I wrote an email to python-dev: https://mail.python.org/archives/list/python-dev@python.org/thread/VM6I3UHVMME6QRSUOYLK6N2OZHP454W6/ |
Good call on using the |