python-stdlib-sentinels icon indicating copy to clipboard operation
python-stdlib-sentinels copied to clipboard

Reference implementation of sentinels for the Python stdlib

Results 6 python-stdlib-sentinels issues
Sort by recently updated
recently updated
newest added

As described in #12, Sentinels truthyness depends on the context of the sentinel. This allows us to set what the sentinel can mean, and by default sentinels are ambiguous and...

I propose a style guide when we create a `sentinel`. Common standard python sentinels like 'True', 'False', 'None' follow this style 1. **Naming Conventions**: The requirement for sentinel names to...

I really like the proposed `Sentinel` class because when using an `Enum` for a singleton type it always annoyingly shows up in type signatures and autogenerated documentation. However I think...

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...

The [Specification section of PEP 661](https://peps.python.org/pep-0661/#specification) currently says: > A new `Sentinel` class will be added to a new `sentinels` module. Note "sentinels" in plural but goes on with a...

Is there any chance that you could upload this reference implementation to PyPI? I'd like to use these sentinels in some of my projects, and it would be easier to...