On Thu, 31 Aug 2023 at 18:55, Tim Hoffmann via Python-ideas <python-ideas@python.org> wrote: > > The standard pattern to create a sentinel in Python is > > >>> Unset = object() > > While this is often good enough, it has some shortcomings: > > - repr(Unset) is unhelpful: <object at 0x1ded9911b60> >
Looks like you may be thinking of this: https://peps.python.org/pep-0661/ There are a few options here, including classes, enums, and a dedicated sentinel type. ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/6C2FSMYQ2PBRUXRU7MVXTN2J6OJH64NZ/ Code of Conduct: http://python.org/psf/codeofconduct/