Tal Einat <[email protected]> added the comment:
Alternatively, sentinels can simply be classes:
class Sentinel:
def __new__(cls, *args, **kwargs):
raise TypeError(f'{cls.__qualname__} cannot be instantiated')
class MISSING(Sentinel):
pass
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue44123>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com