On Thu, 31 Aug 2023 at 18:55, Tim Hoffmann via Python-ideas <[email protected]> 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 -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/6C2FSMYQ2PBRUXRU7MVXTN2J6OJH64NZ/ Code of Conduct: http://python.org/psf/codeofconduct/
