python-stdlib-sentinels
python-stdlib-sentinels copied to clipboard
May `Sentinel` be subclassed?
The specification currently does not specify whether or not the Sentinel class may be subclassed.
The reference implementation does not use @typing.final, allowing subclasses, which I think does make sense because it allows e.g. the __str__ or __le__ methods of sentinel objects to be customized, which can be very useful.
I think it would make sense to clarify the specification to say that the Sentinel class may be subclassed.