Skip to content

Clean up initialization __class_getitem__ with Py_GenericAlias. #28450

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

Merged

Conversation

serhiy-storchaka
Copy link
Member

The cast to PyCFunction is redundant. Overuse of redundant casts
can hide actual bugs.

The cast to PyCFunction is redundant. Overuse of redundant casts
can hide actual bugs.
@Fidget-Spinner
Copy link
Member

Should the example in the docs change too? https://docs.python.org/3/c-api/typehints.html

@serhiy-storchaka
Copy link
Member Author

Good catch @Fidget-Spinner!

Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks Serhiy.

@serhiy-storchaka serhiy-storchaka merged commit f25f2e2 into python:main Sep 19, 2021
@serhiy-storchaka serhiy-storchaka deleted the __class_getitem__-decl-cleanup branch September 19, 2021 15:05
niyas-sait pushed a commit to niyas-sait/cpython that referenced this pull request Sep 21, 2021
…onGH-28450)

The cast to PyCFunction is redundant. Overuse of redundant casts
can hide actual bugs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants