René's URL Explorer Experiment


Title: PEP 661 – Sentinel Values | peps.python.org

Open Graph Title: PEP 661 – Sentinel Values | peps.python.org

Description: Unique placeholder values, commonly known as “sentinel values”, are common in programming. They have many uses, such as for:

Open Graph Description: Unique placeholder values, commonly known as “sentinel values”, are common in programming. They have many uses, such as for:

Opengraph URL: https://peps.python.org/pep-0661/

direct link

Domain: peps.python.org

color-schemelight dark
og:typewebsite
og:site_namePython Enhancement Proposals (PEPs)
og:imagehttps://peps.python.org/_static/og-image.png
og:image:altPython PEPs
og:image:width200
og:image:height200
theme-color#3776ab

Links:

Pythonhttps://www.python.org/
PEP Indexhttps://peps.python.org/
Discourse threadhttps://discuss.python.org/t/pep-661-sentinel-values/9126
20-May-2021https://discuss.python.org/t/sentinel-values-in-the-stdlib/8810
06-Jun-2021https://discuss.python.org/t/pep-661-sentinel-values/9126
23-Apr-2026https://discuss.python.org/t/pep-661-sentinel-values/9126/337
Abstracthttps://peps.python.org/661#abstract
Motivationhttps://peps.python.org/661#motivation
Rationalehttps://peps.python.org/661#rationale
Specificationhttps://peps.python.org/661#specification
Typinghttps://peps.python.org/661#typing
C APIhttps://peps.python.org/661#c-api
Backwards Compatibilityhttps://peps.python.org/661#backwards-compatibility
How to Teach Thishttps://peps.python.org/661#how-to-teach-this
Security Implicationshttps://peps.python.org/661#security-implications
Reference Implementationhttps://peps.python.org/661#reference-implementation
Rejected Ideashttps://peps.python.org/661#rejected-ideas
Use NotGiven = object()https://peps.python.org/661#use-notgiven-object
Add a single new sentinel value, such as MISSING or Sentinelhttps://peps.python.org/661#add-a-single-new-sentinel-value-such-as-missing-or-sentinel
Use the existing Ellipsis sentinel valuehttps://peps.python.org/661#use-the-existing-ellipsis-sentinel-value
Use a single-valued enumhttps://peps.python.org/661#use-a-single-valued-enum
A sentinel class decoratorhttps://peps.python.org/661#a-sentinel-class-decorator
Using class objectshttps://peps.python.org/661#using-class-objects
Define a recommended “standard” idiom, without supplying an implementationhttps://peps.python.org/661#define-a-recommended-standard-idiom-without-supplying-an-implementation
Use a new standard library modulehttps://peps.python.org/661#use-a-new-standard-library-module
Use a registry of per-module sentinel nameshttps://peps.python.org/661#use-a-registry-of-per-module-sentinel-names
Automatically discover or pass a module namehttps://peps.python.org/661#automatically-discover-or-pass-a-module-name
Allowing customization of boolean evaluationhttps://peps.python.org/661#allowing-customization-of-boolean-evaluation
Using typing.Literal in type annotationshttps://peps.python.org/661#using-typing-literal-in-type-annotations
Additional Noteshttps://peps.python.org/661#additional-notes
Footnoteshttps://peps.python.org/661#footnotes
Copyrighthttps://peps.python.org/661#copyright
sentinelhttps://docs.python.org/3.15/builtins/functions.html#sentinel
PEP 1https://peps.python.org/pep-0001/
Abstracthttps://peps.python.org/661#abstract
Motivationhttps://peps.python.org/661#motivation
[1]https://peps.python.org/661#id15
[2]https://peps.python.org/661#id16
[3]https://peps.python.org/661#id17
[4]https://peps.python.org/661#id18
Rationalehttps://peps.python.org/661#rationale
[2]https://peps.python.org/661#id16
[5]https://peps.python.org/661#id19
[6]https://peps.python.org/661#id20
Reference Implementationhttps://peps.python.org/661#reference-implementation
Specificationhttps://peps.python.org/661#specification
Typinghttps://peps.python.org/661#typing
type expressionshttps://typing.python.org/en/latest/spec/glossary.html#term-type-expression
type expressionshttps://typing.python.org/en/latest/spec/glossary.html#term-type-expression
fully static typehttps://typing.python.org/en/latest/spec/glossary.html#term-fully-static-type
typing.Unionhttps://docs.python.org/3/library/typing.html#typing.Union
supportshttps://github.com/python/steering-council/issues/258#issuecomment-2417524379
C APIhttps://peps.python.org/661#c-api
Backwards Compatibilityhttps://peps.python.org/661#backwards-compatibility
How to Teach Thishttps://peps.python.org/661#how-to-teach-this
Security Implicationshttps://peps.python.org/661#security-implications
Reference Implementationhttps://peps.python.org/661#reference-implementation
[10]https://peps.python.org/661#id24
[7]https://peps.python.org/661#id21
existshttps://typing-extensions.readthedocs.io/en/latest/#typing_extensions.Sentinel
typing-extensionshttps://pypi.org/project/typing-extensions/
Rejected Ideashttps://peps.python.org/661#rejected-ideas
Use NotGiven = object()https://peps.python.org/661#use-notgiven-object
Rationalehttps://peps.python.org/661#rationale
Add a single new sentinel value, such as MISSING or Sentinelhttps://peps.python.org/661#add-a-single-new-sentinel-value-such-as-missing-or-sentinel
[4]https://peps.python.org/661#id18
Use the existing Ellipsis sentinel valuehttps://peps.python.org/661#use-the-existing-ellipsis-sentinel-value
Use a single-valued enumhttps://peps.python.org/661#use-a-single-valued-enum
[4]https://peps.python.org/661#id18
A sentinel class decoratorhttps://peps.python.org/661#a-sentinel-class-decorator
Using class objectshttps://peps.python.org/661#using-class-objects
Define a recommended “standard” idiom, without supplying an implementationhttps://peps.python.org/661#define-a-recommended-standard-idiom-without-supplying-an-implementation
[4]https://peps.python.org/661#id18
Use a new standard library modulehttps://peps.python.org/661#use-a-new-standard-library-module
Use a registry of per-module sentinel nameshttps://peps.python.org/661#use-a-registry-of-per-module-sentinel-names
Automatically discover or pass a module namehttps://peps.python.org/661#automatically-discover-or-pass-a-module-name
Allowing customization of boolean evaluationhttps://peps.python.org/661#allowing-customization-of-boolean-evaluation
Using typing.Literal in type annotationshttps://peps.python.org/661#using-typing-literal-in-type-annotations
Additional Noteshttps://peps.python.org/661#additional-notes
[8]https://peps.python.org/661#id22
[9]https://peps.python.org/661#id23
Footnoteshttps://peps.python.org/661#footnotes
1https://peps.python.org/661#id1
The repr of a sentinelhttps://mail.python.org/archives/list/python-dev@python.org/thread/ZLVPD2OISI7M4POMTR2FCQTE6TPMPTO3/
1https://peps.python.org/661#id2
2https://peps.python.org/661#id5
“The stdlib contains tons of sentinels”https://mail.python.org/archives/list/python-dev@python.org/message/JBYXQH3NV3YBF7P2HLHB5CD6V3GVTY55/
3https://peps.python.org/661#id3
bpo-44123: Make function parameter sentinel values true singletonshttps://github.com/python/cpython/issues/88289
1https://peps.python.org/661#id4
2https://peps.python.org/661#id10
3https://peps.python.org/661#id11
4https://peps.python.org/661#id12
Sentinel Values in the Stdlibhttps://discuss.python.org/t/sentinel-values-in-the-stdlib/8810/
5https://peps.python.org/661#id6
The “sentinels” package on PyPIhttps://pypi.org/project/sentinels/
6https://peps.python.org/661#id7
The “sentinel” package on PyPIhttps://pypi.org/project/sentinel/
7https://peps.python.org/661#id9
Reference implementation at the taleinat/python-stdlib-sentinels GitHub repohttps://github.com/taleinat/python-stdlib-sentinels
8https://peps.python.org/661#id13
bpo-35712: Make NotImplemented unusable in boolean contexthttps://github.com/python/cpython/issues/79893
9https://peps.python.org/661#id14
Discussion thread about type signatures for these sentinels on the typing-sig mailing listhttps://mail.python.org/archives/list/typing-sig@python.org/thread/NDEJ7UCDPINP634GXWDARVMTGDVSNBKV/#LVCPTY26JQJW7NKGKGAZXHQKWVW7GOGL
10https://peps.python.org/661#id8
CPython reference implementationhttps://github.com/JelleZijlstra/cpython/pull/4
Copyrighthttps://peps.python.org/661#copyright
Abstracthttps://peps.python.org/661#abstract
Motivationhttps://peps.python.org/661#motivation
Rationalehttps://peps.python.org/661#rationale
Specificationhttps://peps.python.org/661#specification
Typinghttps://peps.python.org/661#typing
C APIhttps://peps.python.org/661#c-api
Backwards Compatibilityhttps://peps.python.org/661#backwards-compatibility
How to Teach Thishttps://peps.python.org/661#how-to-teach-this
Security Implicationshttps://peps.python.org/661#security-implications
Reference Implementationhttps://peps.python.org/661#reference-implementation
Rejected Ideashttps://peps.python.org/661#rejected-ideas
Use NotGiven = object()https://peps.python.org/661#use-notgiven-object
Add a single new sentinel value, such as MISSING or Sentinelhttps://peps.python.org/661#add-a-single-new-sentinel-value-such-as-missing-or-sentinel
Use the existing Ellipsis sentinel valuehttps://peps.python.org/661#use-the-existing-ellipsis-sentinel-value
Use a single-valued enumhttps://peps.python.org/661#use-a-single-valued-enum
A sentinel class decoratorhttps://peps.python.org/661#a-sentinel-class-decorator
Using class objectshttps://peps.python.org/661#using-class-objects
Define a recommended “standard” idiom, without supplying an implementationhttps://peps.python.org/661#define-a-recommended-standard-idiom-without-supplying-an-implementation
Use a new standard library modulehttps://peps.python.org/661#use-a-new-standard-library-module
Use a registry of per-module sentinel nameshttps://peps.python.org/661#use-a-registry-of-per-module-sentinel-names
Automatically discover or pass a module namehttps://peps.python.org/661#automatically-discover-or-pass-a-module-name
Allowing customization of boolean evaluationhttps://peps.python.org/661#allowing-customization-of-boolean-evaluation
Using typing.Literal in type annotationshttps://peps.python.org/661#using-typing-literal-in-type-annotations
Additional Noteshttps://peps.python.org/661#additional-notes
Footnoteshttps://peps.python.org/661#footnotes
Copyrighthttps://peps.python.org/661#copyright
Page Source (GitHub)https://github.com/python/peps/blob/main/peps/pep-0661.rst?plain=1
https://github.com/python/peps/blob/main/peps/pep-0661.rsthttps://github.com/python/peps/blob/main/peps/pep-0661.rst
2026-05-19 16:05:08 UTChttps://github.com/python/peps/commits/main/peps/pep-0661.rst

Viewport: width=device-width, initial-scale=1.0


URLs of crawlers that visited me.