GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — gh-104600: Make function.__type_params__ writable by JelleZijlstra · Pull Request #104601 · python/cpython Conversation
|
| { | ||
| /* Not legal to del f.__type_params__ or to set it to anything | ||
| * other than a tuple object. */ | ||
| if (value == NULL || !PyTuple_Check(value)) { |
There was a problem 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?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.