Thanks for the pointer. A quick look didn't find anything in the PEP (661) about types, and the thread you linked to is too long to read in its entirety. Can someone summarize what they ended up deciding?

On Tue, Sep 28, 2021 at 8:41 AM Alex Waygood <alex.waygood@gmail.com> wrote:
There has been a lot of detailed discussion recently on discuss.python.org regarding a proposed PEP (PEP 661) to provide a better solution to the issue of sentinel values in Python. Much of this conversation seems to be duplicating points that have already been discussed in that thread: https://discuss.python.org/t/pep-661-sentinel-values/9126.

Notably, the issue of how to approach type-hinting sentinel values is one of the key points of discussion in the thread. 

Alex

-------- Original message --------
From: Carl Meyer <carl@oddbird.net>
Date: 28/09/2021 04:22 (GMT+00:00)
To: Eric Traut <eric@traut.com>
Cc: typing-sig@python.org
Subject: [Typing-sig] Re: Using Final to signify a singleton?



On Mon, Sep 27, 2021 at 7:18 PM Eric Traut <eric@traut.com> wrote:
Brett, is there a reason you don't want to use `None` as a sentinel?

Can’t speak for Brett’s specific case, but I’ve more than once had cases where None could be a valid user-provided value for an argument, and thus a function-specific sentinel was needed. This pattern used to be pretty simple with `MISSING = object()`; typing makes it more complicated. 

Carl
_______________________________________________
Typing-sig mailing list -- typing-sig@python.org
To unsubscribe send an email to typing-sig-leave@python.org
https://mail.python.org/mailman3/lists/typing-sig.python.org/
Member address: guido@python.org


--
--Guido van Rossum (python.org/~guido)
Pronouns: he/him (why is my pronoun here?)