summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
authorAlex Waygood <Alex.Waygood@Gmail.com>2023-05-18 21:58:42 (GMT)
committerGitHub <noreply@github.com>2023-05-18 21:58:42 (GMT)
commit1c55e8d00728ceabd97cd1a5bd4906c9875a80c6 (patch)
tree5be4b4369cf14f9e49df39e2788e4f0fc90435bb /Objects/object.c
parent61027c0211adf50e81b202075246509775808482 (diff)
downloadcpython-1c55e8d00728ceabd97cd1a5bd4906c9875a80c6.zip
cpython-1c55e8d00728ceabd97cd1a5bd4906c9875a80c6.tar.gz
cpython-1c55e8d00728ceabd97cd1a5bd4906c9875a80c6.tar.bz2
gh-104050: Improve some typing around `default`s and sentinel values (#104626)
- Convert `unspecified` and `unknown` to be members of a `Sentinels` enum, rather than instances of bespoke classes. - An enum feels more idiomatic here, and works better with type checkers. - Convert some `==` and `!=` checks for these values to identity checks, which are more idiomatic with sentinels. - _Don't_ do the same for `Null`, as this needs to be a distinct type due to its usage in `clinic.py`. - Use `object` as the annotation for `default` across `clinic.py`. `default` can be literally any object, so `object` is the correct annotation here. --- Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Diffstat (limited to 'Objects/object.c')
0 files changed, 0 insertions, 0 deletions