On Mon, May 24, 2021 at 4:10 AM MRAB <pyt...@mrabarnett.plus.com> wrote: > > On 2021-05-24 01:37, Luciano Ramalho wrote: > > Now I can use NotGiven as the sentinel, and its default repr is <NotGiven>. > > > The repr of other singletons are the names of those singletons, eg. > "None", so why "<NotGiven>" instead of "NotGiven"?
Yea, that's up in the air. The common suggestions are either "NotGiven", "<NotGiven>" or "mymodule.NotGiven". The first makes sense for builtins like None and Ellipses, but I'm not sure a function signature like foo(bar=NotGiven) is very clear. With the factory function pattern there's no need for a default, so this may become a non-issue, and I may remove the recommendation for which form to use. - Tal _______________________________________________ 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/WMS3CLQ765HAN3WCQKCL2XSSJUNP45LY/ Code of Conduct: http://python.org/psf/codeofconduct/