> There was a discussion a while back ( a year or so?? ) on Python-ideas
> that introduced the idea of having more "sentinel-like" singletons in
> Python -- right now, we only have None.
>

Not quite true, we also have Ellipsis, which already has a nice repr that
both reads easily and still follows the convention of eval(repr(x)) == x.
It also is already safe from instantiation, survives pickle round-trip and
is multi-thread safe.
So long as you are not dealing with scientific projects, it seems a
quick (if dirty) solution to having a sentinel that is not None. There is
also some symmetrical wholeness when considered with the other builtin
sentinels: bool(None) is False; bool(Ellipsis) is True.
_______________________________________________
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/UQPD5NNAVWIQWIACOY7YRZGWMJO4URJ5/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to