Skip to content

Conversation

@JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented May 18, 2023

@rhettinger rhettinger removed their request for review May 18, 2023 04:05
{
/* Not legal to del f.__type_params__ or to set it to anything
* other than a tuple object. */
if (value == NULL || !PyTuple_Check(value)) {
Copy link
Member

Choose a reason for hiding this comment

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

Does it make sense to use PyTuple_CheckExact instead of PyTuple_Check? With PyTuple_Check we can pass to __type_params__ subclass of tuple. May it break something?

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't really use the __type_params__ in the interpreter, so there's low risk. The other attributes also allow subclasses (e.g. check func_set_defaults and func_set_name).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants