On May 14, 2021, at 02:38, Chris Angelico <ros...@gmail.com> wrote:
> 
> Do we ever really need the ability to pass a specific sentinel to a
> function, or are we actually looking for a way to say "and don't pass
> this argument”?

Very often, that’s the case.  Such a “it’s okay to not pass this argument” 
construct would have to work with the Optional type too.

The other use case I have for a special case single use singleton is for 
dict.get(), i.e.

missing = object()
value = somedict.get(‘key’, missing)
if value is missing:
    # It ain’t there.

-Barry

Attachment: signature.asc
Description: Message signed with OpenPGP

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/2VTKCFCR6PPMS5ZYUYM3SF2BVFQYMSSE/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to