gh-104050: Improve some typing around defaults and sentinel values#104626
gh-104050: Improve some typing around defaults and sentinel values#104626AlexWaygood merged 6 commits intopython:mainfrom
defaults and sentinel values#104626Conversation
|
Not sure if converting the |
IMO, the more readable we can get clinic.py, the better. We should thread a little careful here, since |
Fab. Thanks for the review! |
* main: pythongh-74690: Don't set special protocol attributes on non-protocol subclasses of protocols (python#104622) pythongh-104623: Update Windows installer to use SQLite 3.42.0 (python#104625) pythongh-104050: Add more type annotations to Argument Clinic (python#104628) pythongh-104629: Don't skip test_clinic if _testclinic is missing (python#104630) pythongh-104549: Set __module__ on TypeAliasType (python#104550) pythongh-104050: Improve some typing around `default`s and sentinel values (python#104626) pythongh-104146: Remove unused vars from Argument Clinic (python#104627) pythongh-104615: don't make unsafe swaps in apply_static_swaps (python#104620) pythonGH-104484: Add case_sensitive argument to `pathlib.PurePath.match()` (pythonGH-104565) pythonGH-96803: Document and test new unstable internal frame API functions (pythonGH-104211) pythonGH-104580: Don't cache eval breaker in interpreter (pythonGH-104581)
unspecifiedandunknownto be members of aSentinelsenum, rather than instances of bespoke classes.==and!=checks for these values to identity checks, which are more idiomatic with sentinels.Null, as this needs to be a distinct type due to its usage inclinic.py.objectas the annotation fordefaultacrossclinic.py.defaultcan be literally any object, soobjectis the correct annotation here.