On May 14, 2021, at 02:38, Chris Angelico email@example.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.