gh-149083: Convert some private and simple sentinels to PEP 661#149084
gh-149083: Convert some private and simple sentinels to PEP 661#149084JelleZijlstra wants to merge 6 commits into
Conversation
picnixz
left a comment
There was a problem hiding this comment.
There is a sentinel in hashlib.py to detect usage of arguments and raise appropriate warnings/errors so could you also update it? it's a hacky code because I needed to mirror the C behavior in some sense.
picnixz
left a comment
There was a problem hiding this comment.
In dataclasses, there is also _FIELD, _FIELD_CLASSVAR and _FIELD_INITVAR that you could update I think?
|
I was going to leave those dataclasses objects alone since they're instances of a common class, and I wouldn't be able to preserve that behavior. |
|
|
Documentation build overview
71 files changed ·
|
serhiy-storchaka
left a comment
There was a problem hiding this comment.
I think that using names like "", "", etc for sentinels shown in function signatures will more clearly show that the behavior when the argument is not specified differs from the behavior when the argument is specified with any value.
Currently, for functions implemented in Argument Clinic it is shown as <unrepresentable>, but <not specified> would be better in most cases.
Uh oh!
There was an error while loading. Please reload this page.