X Tutup
Skip to content

Clean up initialization __class_getitem__ with Py_GenericAlias.#28450

Merged
serhiy-storchaka merged 2 commits intopython:mainfrom
serhiy-storchaka:__class_getitem__-decl-cleanup
Sep 19, 2021
Merged

Clean up initialization __class_getitem__ with Py_GenericAlias.#28450
serhiy-storchaka merged 2 commits intopython:mainfrom
serhiy-storchaka:__class_getitem__-decl-cleanup

Conversation

@serhiy-storchaka
Copy link
Copy Markdown
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
Copy Markdown
Member

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

@serhiy-storchaka
Copy link
Copy Markdown
Member Author

Good catch @Fidget-Spinner!

Copy link
Copy Markdown
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

X Tutup