René's URL Explorer Experiment


Title: Python Sentinel Values: Using the New sentinel Built-in – Real Python

Open Graph Title: Python Sentinel Values: Using the New sentinel Built-in – Real Python

Description: Learn how to create a Python sentinel value with the new built-in in Python 3.15 and get readable signatures, type hints, and safe copying and pickling.

Open Graph Description: Learn how to create a Python sentinel value with the new built-in in Python 3.15 and get readable signatures, type hints, and safe copying and pickling.

Mail addresses
?subject=Python article for you&body=Python Sentinel Values: Using the New sentinel Built-in on Real Python https://realpython.com/python315-sentinel-values/

Opengraph URL: https://realpython.com/python315-sentinel-values/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
{
  "@context": "http://schema.org",
  "@type": "Article",
  "headline": "Python Sentinel Values: Using the New sentinel Built-in",
  "image": {
    "@type": "ImageObject",
    "url": "https://files.realpython.com/media/Python-3.15-Preview-Sentinel-Values_Watermarked.4141cc1cbc76.jpg",
    "width": 1920,
    "height": 1080
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://realpython.com/python315-sentinel-values/",
    "lastReviewed": "2026-10-12",
    "author": {
      "@type": "Person",
      "name": "Leodanis Pozo Ramos",
      "image": "https://realpython.com/cdn-cgi/image/width=862,height=862,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Perfil_final1.9f896bc212f6.jpg",
      "url": "https://realpython.com/team/lpozoramos/",
      "affiliation": {
        "@type": "Organization",
        "@id": "https://realpython.com/#organization",
        "name": "Real Python",
        "url": "https://realpython.com",
        "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
      }
    },
    "reviewedBy": [
      {
        "@type": "Person",
        "name": "Aldren Santos",
        "image": "https://realpython.com/cdn-cgi/image/width=500,height=500,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Aldren_Santos_Real_Python.6b0861d8b841.png",
        "url": "https://realpython.com/team/asantos/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Brenda Weleschuk",
        "image": "https://realpython.com/cdn-cgi/image/width=320,height=320,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/IMG_3324_1.50b309355fc1.jpg",
        "url": "https://realpython.com/team/bweleschuk/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Bartosz Zaczy\u0144ski",
        "image": "https://realpython.com/cdn-cgi/image/width=1694,height=1694,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/coders_lab_2109368.259b1599fbee.jpg",
        "url": "https://realpython.com/team/bzaczynski/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      }
    ]
  },
  "datePublished": "2026-09-28T14:00:00+00:00",
  "dateModified": "2026-10-12T08:15:35.644563+00:00",
  "publisher": {
    "@type": "Organization",
    "@id": "https://realpython.com/#organization",
    "name": "Real Python",
    "url": "https://realpython.com",
    "logo": {
      "@type": "ImageObject",
      "url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
      "width": 512,
      "height": 512
    },
    "description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
    "slogan": "Become a Python Expert",
    "email": "info@realpython.com",
    "sameAs": [
      "https://github.com/realpython",
      "https://www.youtube.com/realpython",
      "https://twitter.com/realpython",
      "https://x.com/realpython",
      "https://www.linkedin.com/company/realpython-com/",
      "https://www.facebook.com/learnrealpython",
      "https://www.instagram.com/realpython",
      "https://www.tiktok.com/@realpython.com"
    ]
  },
  "author": {
    "@type": "Person",
    "name": "Leodanis Pozo Ramos",
    "image": "https://realpython.com/cdn-cgi/image/width=862,height=862,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Perfil_final1.9f896bc212f6.jpg",
    "url": "https://realpython.com/team/lpozoramos/",
    "affiliation": {
      "@type": "Organization",
      "@id": "https://realpython.com/#organization",
      "name": "Real Python",
      "url": "https://realpython.com",
      "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
    }
  },
  "description": "Learn how to create a Python sentinel value with the new built-in in Python 3.15 and get readable signatures, type hints, and safe copying and pickling.",
  "hasPart": {
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "What is a sentinel value in Python?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003eA \u003ca href=\"/ref/computer-science-glossary/sentinel-value/\" class=\"ref-link\"\u003esentinel value\u003c/a\u003e is a value that your code treats as a signal rather than as data. It marks a condition such as \u0026ldquo;no argument was passed,\u0026rdquo; \u0026ldquo;nothing was found,\u0026rdquo; or \u0026ldquo;a loop should stop.\u0026rdquo; What matters is that it stays distinct from every legitimate value your data can take.\u003c/p\u003e"
        }
      },
      {
        "@type": "Question",
        "name": "How do you create a sentinel value in Python 3.15?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003eYou can call the \u003ccode\u003esentinel\u003c/code\u003e built-in with a string that names the marker, then assign the result to a variable with that same name. You don\u0026rsquo;t need an import because \u003ccode\u003esentinel\u003c/code\u003e lives in the built-in namespace. An optional \u003ccode\u003erepr\u003c/code\u003e keyword argument lets you display something other than the name.\u003c/p\u003e"
        }
      },
      {
        "@type": "Question",
        "name": "What problems does Python\u2019s sentinel built-in solve?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003eThe \u003ccode\u003esentinel\u003c/code\u003e built-in fixes the drawbacks of using \u003ccode\u003eobject()\u003c/code\u003e as a marker. It prints a readable name instead of a memory address, gives you a name you can use in a \u003ca href=\"/ref/glossary/type-hint/\" class=\"ref-link\"\u003etype hint\u003c/a\u003e, and keeps its identity through \u003ccode\u003ecopy()\u003c/code\u003e, \u003ccode\u003edeepcopy()\u003c/code\u003e, and a \u003ccode\u003epickle\u003c/code\u003e round trip. Because every sentinel is a unique object, no real data can equal one by accident.\u003c/p\u003e"
        }
      },
      {
        "@type": "Question",
        "name": "When should you use a sentinel instead of None?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003e\u003ccode\u003eNone\u003c/code\u003e is still the right default for most optional parameters. Use a sentinel when \u003ccode\u003eNone\u003c/code\u003e is legitimate data and you need a separate marker for \u0026ldquo;nothing was passed.\u0026rdquo; If you already use an \u003ccode\u003eobject()\u003c/code\u003e marker, switching to a sentinel pays off when the marker appears in a public signature or travels through \u003ccode\u003ecopy\u003c/code\u003e or \u003ccode\u003epickle\u003c/code\u003e. The guide on \u003ca href=\"https://realpython.com/null-in-python/\"\u003eusing null in Python\u003c/a\u003e covers \u003ccode\u003eNone\u003c/code\u003e and its common uses in more depth.\u003c/p\u003e"
        }
      },
      {
        "@type": "Question",
        "name": "Can you use a sentinel value in a type hint?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003eYes. A sentinel supports the \u003ccode\u003e|\u003c/code\u003e operator, so you can use its bare name in a union alongside real types, following the precedent set by \u003ccode\u003eNone\u003c/code\u003e years ago. The sentinel stands for a type whose only member is the sentinel object itself.\u003c/p\u003e"
        }
      }
    ]
  }
}

authorReal Python
theme-color#18354c
color-schemelight dark
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/Python-3.15-Preview-Sentinel-Values_Watermarked.4141cc1cbc76.jpg
og:imagehttps://files.realpython.com/media/Python-3.15-Preview-Sentinel-Values_Watermarked.4141cc1cbc76.jpg
twitter:creator@realpython
og:typearticle
og:site_nameReal Python
apple-mobile-web-app-titleReal Python

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/python315-sentinel-values/
Your Learning Plan →Your personalized Python learning planhttps://realpython.com/account/learning-plan/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest&_from=nav_library
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/search?kind=exercise&kind=quiz&_from=nav_library
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Mentor AI →NewYour personal Python mentorhttps://realpython.com/mentor/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Live Courses →Live, instructor-led Python courseshttps://realpython.com/live/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Unlock All Content and Become a Python Expert →Get unlimited access to all Real Python has to offerhttps://realpython.com/account/join/?from=navbar_learn
Unlock All Content →Become a Python Experthttps://realpython.com/account/join/?from=navbar_learn
More https://realpython.com/python315-sentinel-values/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Contributorhttps://realpython.com/jobs/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?intent=navbar&next=%2Fpython315-sentinel-values%2F
Browse Topicshttps://realpython.com/tutorials/all/
Guided Learning Pathshttps://realpython.com/learning-paths/
Basicshttps://realpython.com/search?level=basics&_from=sidebar_level
Intermediatehttps://realpython.com/search?level=intermediate&_from=sidebar_level
Advancedhttps://realpython.com/search?level=advanced&_from=sidebar_level
aihttps://realpython.com/tutorials/ai/
algorithmshttps://realpython.com/tutorials/algorithms/
apihttps://realpython.com/tutorials/api/
best-practiceshttps://realpython.com/tutorials/best-practices/
careerhttps://realpython.com/tutorials/career/
communityhttps://realpython.com/tutorials/community/
databaseshttps://realpython.com/tutorials/databases/
data-sciencehttps://realpython.com/tutorials/data-science/
data-structureshttps://realpython.com/tutorials/data-structures/
data-vizhttps://realpython.com/tutorials/data-viz/
devopshttps://realpython.com/tutorials/devops/
djangohttps://realpython.com/tutorials/django/
dockerhttps://realpython.com/tutorials/docker/
editorshttps://realpython.com/tutorials/editors/
flaskhttps://realpython.com/tutorials/flask/
front-endhttps://realpython.com/tutorials/front-end/
gamedevhttps://realpython.com/tutorials/gamedev/
guihttps://realpython.com/tutorials/gui/
machine-learninghttps://realpython.com/tutorials/machine-learning/
newshttps://realpython.com/tutorials/news/
numpyhttps://realpython.com/tutorials/numpy/
projectshttps://realpython.com/tutorials/projects/
pythonhttps://realpython.com/tutorials/python/
stdlibhttps://realpython.com/tutorials/stdlib/
testinghttps://realpython.com/tutorials/testing/
toolshttps://realpython.com/tutorials/tools/
web-devhttps://realpython.com/tutorials/web-dev/
web-scrapinghttps://realpython.com/tutorials/web-scraping/
Table of Contentshttps://realpython.com/python315-sentinel-values/#toc
Understand Sentinel Values in Pythonhttps://realpython.com/python315-sentinel-values/#understand-sentinel-values-in-python
Know What a Sentinel Value Ishttps://realpython.com/python315-sentinel-values/#know-what-a-sentinel-value-is
Spot the Sentinels Python Already Useshttps://realpython.com/python315-sentinel-values/#spot-the-sentinels-python-already-uses
Explore Some Limitations of Sentinels in Pythonhttps://realpython.com/python315-sentinel-values/#explore-some-limitations-of-sentinels-in-python
Meet Python 3.15’s Built-in sentinel Typehttps://realpython.com/python315-sentinel-values/#meet-python-315s-built-in-sentinel-type
Create a Sentinel Valuehttps://realpython.com/python315-sentinel-values/#create-a-sentinel-value
Explore How sentinel Instances Behavehttps://realpython.com/python315-sentinel-values/#explore-how-sentinel-instances-behave
Put the New sentinel Built-in to Workhttps://realpython.com/python315-sentinel-values/#put-the-new-sentinel-built-in-to-work
Get a Readable Signaturehttps://realpython.com/python315-sentinel-values/#get-a-readable-signature
Type Hint a Sentinel Valuehttps://realpython.com/python315-sentinel-values/#type-hint-a-sentinel-value
Keep Identity Through copy and picklehttps://realpython.com/python315-sentinel-values/#keep-identity-through-copy-and-pickle
Stop a Loop Without Collisionshttps://realpython.com/python315-sentinel-values/#stop-a-loop-without-collisions
Decide When to Use a sentinel Instancehttps://realpython.com/python315-sentinel-values/#decide-when-to-use-a-sentinel-instance
Conclusionhttps://realpython.com/python315-sentinel-values/#conclusion
Frequently Asked Questionshttps://realpython.com/python315-sentinel-values/#frequently-asked-questions
https://realpython.com/feedback/survey/article/python315-sentinel-values/liked/?from=article-sidebar
https://realpython.com/feedback/survey/article/python315-sentinel-values/disliked/?from=article-sidebar
Leodanis Pozo Ramoshttps://realpython.com/python315-sentinel-values/#author
https://realpython.com/python315-sentinel-values/#reader-comments
intermediatehttps://realpython.com/tutorials/intermediate/
best-practiceshttps://realpython.com/tutorials/best-practices/
pythonhttps://realpython.com/tutorials/python/
Understand Sentinel Values in Pythonhttps://realpython.com/python315-sentinel-values/#understand-sentinel-values-in-python
Know What a Sentinel Value Ishttps://realpython.com/python315-sentinel-values/#know-what-a-sentinel-value-is
Spot the Sentinels Python Already Useshttps://realpython.com/python315-sentinel-values/#spot-the-sentinels-python-already-uses
Explore Some Limitations of Sentinels in Pythonhttps://realpython.com/python315-sentinel-values/#explore-some-limitations-of-sentinels-in-python
Meet Python 3.15’s Built-in sentinel Typehttps://realpython.com/python315-sentinel-values/#meet-python-315s-built-in-sentinel-type
Create a Sentinel Valuehttps://realpython.com/python315-sentinel-values/#create-a-sentinel-value
Explore How sentinel Instances Behavehttps://realpython.com/python315-sentinel-values/#explore-how-sentinel-instances-behave
Put the New sentinel Built-in to Workhttps://realpython.com/python315-sentinel-values/#put-the-new-sentinel-built-in-to-work
Get a Readable Signaturehttps://realpython.com/python315-sentinel-values/#get-a-readable-signature
Type Hint a Sentinel Valuehttps://realpython.com/python315-sentinel-values/#type-hint-a-sentinel-value
Keep Identity Through copy and picklehttps://realpython.com/python315-sentinel-values/#keep-identity-through-copy-and-pickle
Stop a Loop Without Collisionshttps://realpython.com/python315-sentinel-values/#stop-a-loop-without-collisions
Decide When to Use a sentinel Instancehttps://realpython.com/python315-sentinel-values/#decide-when-to-use-a-sentinel-instance
Conclusionhttps://realpython.com/python315-sentinel-values/#conclusion
Frequently Asked Questionshttps://realpython.com/python315-sentinel-values/#frequently-asked-questions
Remove adshttps://realpython.com/account/join/
Python 3.15https://realpython.com/python315-new-features/
Click here to download the free sample codehttps://realpython.com/bonus/python315-sentinel-values-code/
https://realpython.com/quizzes/python315-sentinel-values/
Python 3.15 Preview: Sentinel Valueshttps://realpython.com/quizzes/python315-sentinel-values/
https://realpython.com/python315-sentinel-values/#understand-sentinel-values-in-python
typehttps://realpython.com/ref/glossary/type/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sentinel-values/#know-what-a-sentinel-value-is
sentinel valuehttps://realpython.com/ref/computer-science-glossary/sentinel-value/
algorithmhttps://realpython.com/ref/computer-science-glossary/algorithm/
iterationhttps://realpython.com/ref/glossary/iteration/
threadhttps://realpython.com/ref/glossary/thread/
stringhttps://realpython.com/python-strings/
substringhttps://realpython.com/python-string-contains-substring/
negative indiceshttps://realpython.com/ref/glossary/indexing/
Explore Some Limitations of Sentinels in Pythonhttps://realpython.com/python315-sentinel-values/#explore-some-limitations-of-sentinels-in-python
objecthttps://realpython.com/ref/glossary/object/
loophttps://realpython.com/ref/glossary/loop/
https://files.realpython.com/media/diagram-sentinel-value-read-loop.0115fb190a54.svg
https://realpython.com/python315-sentinel-values/#spot-the-sentinels-python-already-uses
Nonehttps://realpython.com/ref/keywords/none/
optional argumentshttps://realpython.com/python-optional-arguments/
standard libraryhttps://realpython.com/ref/glossary/standard-library/
moduleshttps://realpython.com/ref/glossary/module/
configparserhttps://realpython.com/ref/stdlib/configparser/
inspecthttps://realpython.com/ref/stdlib/inspect/
classhttps://realpython.com/ref/glossary/class/
typinghttps://realpython.com/ref/stdlib/typing/
instancehttps://realpython.com/ref/glossary/instance/
unittest.mockhttps://realpython.com/ref/stdlib/unittest/
.__repr__()https://realpython.com/python-repr-vs-str/
type hinthttps://realpython.com/python-type-checking/
special methodshttps://realpython.com/python-magic-methods/
copyinghttps://realpython.com/python-copy/
Enumhttps://realpython.com/ref/stdlib/enum/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sentinel-values/#explore-some-limitations-of-sentinels-in-python
PEP 661https://peps.python.org/pep-0661/
function signatureshttps://realpython.com/ref/computer-science-glossary/function-signature/
is operatorhttps://realpython.com/python-is-identity-vs-equality/
REPLhttps://realpython.com/ref/glossary/repl/
help()https://realpython.com/ref/builtin-functions/help/
Sphinxhttps://realpython.com/ref/tools/sphinx/
type()https://realpython.com/ref/builtin-functions/type/
deep copyhttps://realpython.com/ref/glossary/deep-copy/
picklehttps://realpython.com/ref/stdlib/pickle/
numberhttps://realpython.com/python-numbers/
dictionaryhttps://realpython.com/python-dicts/
methodhttps://realpython.com/ref/glossary/method/
raisinghttps://realpython.com/python-raise-exception/
dunder methodshttps://realpython.com/ref/glossary/magic-method/
repr()https://realpython.com/ref/builtin-functions/repr/
Enumhttps://realpython.com/python-enum/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sentinel-values/#meet-python-315s-built-in-sentinel-type
PEPhttps://realpython.com/ref/glossary/pep/
uvhttps://realpython.com/python-uv/
How to Install Python on Your Systemhttps://realpython.com/installing-python/
pyenvhttps://realpython.com/intro-to-pyenv/
importhttps://realpython.com/python-import/
namespacehttps://realpython.com/ref/glossary/namespace/
https://realpython.com/python315-sentinel-values/#create-a-sentinel-value
argumenthttps://realpython.com/ref/glossary/argument/
signaturehttps://docs.python.org/3.15/builtins/functions.html#sentinel
parametershttps://realpython.com/ref/glossary/parameter/
strhttps://realpython.com/ref/builtin-types/str/
variablehttps://realpython.com/python-variables/
keyword-only argumenthttps://realpython.com/defining-your-own-python-function/#keyword-only-arguments
positional-only argumenthttps://realpython.com/defining-your-own-python-function/#positional-only-arguments
keywordhttps://realpython.com/defining-your-own-python-function/#keyword-arguments
constructorhttps://realpython.com/python-class-constructor/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sentinel-values/#explore-how-sentinel-instances-behave
truthyhttps://realpython.com/python-boolean/
hashablehttps://realpython.com/ref/glossary/hashable/
dicthttps://realpython.com/ref/builtin-types/dict/
hash()https://realpython.com/ref/builtin-functions/hash/
sethttps://realpython.com/ref/builtin-types/set/
identityhttps://realpython.com/ref/builtin-functions/id/
constantshttps://realpython.com/python-constants/
isinstance()https://realpython.com/ref/builtin-functions/isinstance/
Type Hint a Sentinel Valuehttps://realpython.com/python315-sentinel-values/#type-hint-a-sentinel-value
Picklinghttps://realpython.com/python-pickle-module/
Keep Identity Through copy and picklehttps://realpython.com/python315-sentinel-values/#keep-identity-through-copy-and-pickle
singletonhttps://realpython.com/ref/computer-science-glossary/singleton/
class scopehttps://realpython.com/python-scope-legb-rule/
qualified namehttps://realpython.com/ref/computer-science-glossary/fully-qualified-name-fqn/
local variablehttps://realpython.com/ref/glossary/local-variable/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sentinel-values/#put-the-new-sentinel-built-in-to-work
https://realpython.com/python315-sentinel-values/#get-a-readable-signature
TOMLhttps://realpython.com/python-toml/
tomllibhttps://realpython.com/ref/stdlib/tomllib/
KeyErrorhttps://realpython.com/ref/builtin-exceptions/keyerror/
Python 3.15https://docs.python.org/3.15/whatsnew/3.15.html#whatsnew315-sentinel
underscorehttps://realpython.com/ref/glossary/non-public-name/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sentinel-values/#type-hint-a-sentinel-value
type hintshttps://realpython.com/ref/glossary/type-hint/
inthttps://realpython.com/ref/builtin-types/int/
static type checkerhttps://realpython.com/ref/glossary/static-type-checker/
copyhttps://realpython.com/ref/stdlib/copy/
https://realpython.com/python315-sentinel-values/#keep-identity-through-copy-and-pickle
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sentinel-values/#stop-a-loop-without-collisions
threadhttps://realpython.com/intro-to-python-threading/
https://realpython.com/python315-sentinel-values/#decide-when-to-use-a-sentinel-instance
typing_extensionshttps://typing-extensions.readthedocs.io/en/latest/#typing_extensions.sentinel
https://realpython.com/python315-sentinel-values/#conclusion
copyhttps://realpython.com/ref/stdlib/copy/
picklehttps://realpython.com/ref/stdlib/pickle/
special methodshttps://realpython.com/ref/glossary/magic-method/
Click here to download the free sample codehttps://realpython.com/bonus/python315-sentinel-values-code/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sentinel-values/#frequently-asked-questions
sentinel valuehttps://realpython.com/ref/computer-science-glossary/sentinel-value/
type hinthttps://realpython.com/ref/glossary/type-hint/
using null in Pythonhttps://realpython.com/null-in-python/
https://realpython.com/quizzes/python315-sentinel-values/
Python 3.15 Preview: Sentinel Valueshttps://realpython.com/quizzes/python315-sentinel-values/
https://realpython.com/feedback/survey/article/python315-sentinel-values/liked/?from=article-footer
https://realpython.com/feedback/survey/article/python315-sentinel-values/disliked/?from=article-footer
https://realpython.com/team/lpozoramos/
» More about Leodanishttps://realpython.com/team/lpozoramos/
https://realpython.com/team/asantos/
Aldrenhttps://realpython.com/team/asantos/
https://realpython.com/team/bweleschuk/
Brendahttps://realpython.com/team/bweleschuk/
https://realpython.com/team/bzaczynski/
Bartoszhttps://realpython.com/team/bzaczynski/
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python315-sentinel-values
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python315-sentinel-values
https://realpython.com/feedback/survey/article/python315-sentinel-values/liked/?from=article-comments
https://realpython.com/feedback/survey/article/python315-sentinel-values/disliked/?from=article-comments
LinkedInhttps://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Frealpython.com%2Fpython315-sentinel-values%2F
Twitterhttps://twitter.com/intent/tweet/?text=Interesting%20Python%20article%20on%20%40realpython%3A%20Python%20Sentinel%20Values%3A%20Using%20the%20New%20sentinel%20Built-in&url=https%3A%2F%2Frealpython.com%2Fpython315-sentinel-values%2F
Blueskyhttps://bsky.app/intent/compose?text=Interesting%20Python%20article%20on%20%40realpython.com%3A%20Python%20Sentinel%20Values%3A%20Using%20the%20New%20sentinel%20Built-in%20https%3A%2F%2Frealpython.com%2Fpython315-sentinel-values%2F
Facebookhttps://facebook.com/sharer/sharer.php?u=https%3A%2F%2Frealpython.com%2Fpython315-sentinel-values%2F
Get tips for asking good questionshttps://realpython.com/python-beginner-tips/#tip-9-ask-good-questions
get answers to common questions in our support portalhttps://support.realpython.com
Real Python Community Chathttps://realpython.com/community/
“Office Hours” Live Q&A Sessionhttps://realpython.com/office-hours/
intermediatehttps://realpython.com/tutorials/intermediate/
best-practiceshttps://realpython.com/tutorials/best-practices/
pythonhttps://realpython.com/tutorials/python/
Python 3.15: Cool New Features for You to Tryhttps://realpython.com/python315-new-features/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python315-sentinel-values
Python Project Structure: How to Choose the Right Layouthttps://realpython.com/python-application-layouts/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python315-sentinel-values
Python 3.15 Gets a Surprise RC3 and Other Python News for October 2026https://realpython.com/python-news-october-2026/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python315-sentinel-values
The Best IDEs and Code Editors for Python (Guide)https://realpython.com/python-ides-code-editors-guide/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python315-sentinel-values
What Is Meta Muse? A Plain-English Guide to Meta's New AIhttps://realpython.com/what-is-meta-muse/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python315-sentinel-values
https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython315-sentinel-values%2F
Continue »https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython315-sentinel-values%2F
Sign-Inhttps://realpython.com/account/login/?intent=continue_reading&next=/python315-sentinel-values/
Start Herehttps://realpython.com/start-here/
Your Learning Planhttps://realpython.com/account/learning-plan/
Browse Topicshttps://realpython.com/tutorials/all/
Learning Resourceshttps://realpython.com/search
Python Referencehttps://realpython.com/ref/
Cheat Sheetshttps://realpython.com/cheatsheets/
Support Centerhttps://support.realpython.com
Mentor AIhttps://realpython.com/mentor/
Learning Pathshttps://realpython.com/learning-paths/
Tutorialshttps://realpython.com/tutorials/
Courseshttps://realpython.com/courses/
Quizzeshttps://realpython.com/quizzes/
Coding Exerciseshttps://realpython.com/coding-exercises/
Live Courseshttps://realpython.com/live/
Bookshttps://realpython.com/books/
Data Sciencehttps://realpython.com/start/data-science-analytics/
AI Apps & Agentshttps://realpython.com/start/ai-apps-agents/
Machine Learninghttps://realpython.com/start/machine-learning/
Automationhttps://realpython.com/start/scripting-automation/
Web Developmenthttps://realpython.com/start/web-development-apis/
Cybersecurityhttps://realpython.com/start/cybersecurity/
Podcasthttps://realpython.com/podcasts/rpp/
Newsletterhttps://realpython.com/newsletter/
Community Chathttps://realpython.com/community/
Office Hourshttps://realpython.com/office-hours/
Learner Storieshttps://realpython.com/learner-stories/
Plans & Pricinghttps://realpython.com/account/join/
Team Planshttps://realpython.com/account/join-team/
For Businesshttps://realpython.com/account/join-team/inquiry/
For Schoolshttps://realpython.com/account/join-team/education-inquiry/
Reviewshttps://realpython.com/learner-stories/
About Ushttps://realpython.com/about/
Teamhttps://realpython.com/team/
Mission & Valueshttps://realpython.com/mission/
Editorial Guidelineshttps://realpython.com/editorial-guidelines/
Sponsorshipshttps://realpython.com/sponsorships/
Careershttps://realpython.workable.com
Press Kithttps://realpython.com/media-kit/
Merchhttps://realpython.com/merch
https://www.youtube.com/realpython
https://x.com/realpython
https://www.linkedin.com/company/realpython-com
https://www.facebook.com/LearnRealPython
https://github.com/realpython/
Privacy Policyhttps://realpython.com/privacy-policy/
Terms of Usehttps://realpython.com/terms/
Securityhttps://realpython.com/security/
Contacthttps://realpython.com/contact/
https://realpython.com/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.