{"guid":"08ec476d-fab4-41dc-9bcb-418ed3962767","title":"Sentinel Values in Python: Why None Is Not Enough","subtitle":null,"slug":"sps26-110863-sentinel-values-in-python-w","link":"https://talks.python-summit.ch/swiss-python-summit-2026/talk/JHJ3XY/","description":"Every Python developer has used `None` as a default but what happens when `None` is also a valid value? This talk explores sentinel values as a first-class concept in Python. We'll uncover why `None` is semantically overloaded, how built-in sentinels like `NotImplemented` and `...` (Ellipsis) quietly power Python's object model, and what happens when you try to create your own. The central challenge: Python's type system has no good answer for sentinel values. We'll walk through why `Optional`, `Literal`, and custom classes all fall short, look at real-world workarounds including Pydantic's experimental MISSING, and discuss what PEP 661's deferral means for your code today. You'll leave with a clear mental model and practical guidance for handling absence in typed Python.","original_language":"eng","persons":["Florian Wilhelm"],"view_count":0,"promoted":false,"date":"2026-10-22T13:35:00.000+02:00","release_date":"2026-11-11T00:00:00.000+01:00","updated_at":"2026-11-11T05:32:04.023+01:00","tags":["110863","2026","sps26","Python, the programming language you love","Aula","sps26-eng"],"length":2090,"duration":2090,"thumb_url":"https://static.media.ccc.de/media/conferences/sps26/110863-08ec476d-fab4-41dc-9bcb-418ed3962767.jpg","poster_url":"https://static.media.ccc.de/media/conferences/sps26/110863-08ec476d-fab4-41dc-9bcb-418ed3962767_preview.jpg","timeline_url":"https://static.media.ccc.de/media/conferences/sps26/110863-08ec476d-fab4-41dc-9bcb-418ed3962767.timeline.jpg","thumbnails_url":"https://static.media.ccc.de/media/conferences/sps26/110863-08ec476d-fab4-41dc-9bcb-418ed3962767.thumbnails.vtt","frontend_link":"https://media.ccc.de/v/sps26-110863-sentinel-values-in-python-w","url":"https://api.media.ccc.de/public/events/08ec476d-fab4-41dc-9bcb-418ed3962767","conference_title":"Swiss Python Summit 2026","conference_url":"https://api.media.ccc.de/public/conferences/sps26","related":[],"recordings":[{"length":2090,"mime_type":"video/mp4","language":"eng","filename":"import-110863-eng-Sentinel_Values_in_Python_Why_None_Is_Not_Enough_hd.mp4","state":"new","folder":"h264-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2026-11-11T03:40:51.148+01:00","label":"eng 1080p","size":183,"recording_url":"https://cdn.media.ccc.de/events/sps26/h264-hd/import-110863-eng-Sentinel_Values_in_Python_Why_None_Is_Not_Enough_hd.mp4","url":"https://api.media.ccc.de/public/recordings/107336","event_url":"https://api.media.ccc.de/public/events/08ec476d-fab4-41dc-9bcb-418ed3962767","conference_url":"https://api.media.ccc.de/public/conferences/sps26"},{"length":2090,"mime_type":"video/mp4","language":"eng","filename":"import-110863-eng-Sentinel_Values_in_Python_Why_None_Is_Not_Enough_sd.mp4","state":"new","folder":"h264-sd","high_quality":false,"width":720,"height":576,"updated_at":"2026-11-11T04:45:58.432+01:00","label":"eng 576p","size":70,"recording_url":"https://cdn.media.ccc.de/events/sps26/h264-sd/import-110863-eng-Sentinel_Values_in_Python_Why_None_Is_Not_Enough_sd.mp4","url":"https://api.media.ccc.de/public/recordings/107368","event_url":"https://api.media.ccc.de/public/events/08ec476d-fab4-41dc-9bcb-418ed3962767","conference_url":"https://api.media.ccc.de/public/conferences/sps26"},{"length":2090,"mime_type":"audio/opus","language":"eng","filename":"import-110863-eng-Sentinel_Values_in_Python_Why_None_Is_Not_Enough_opus.opus","state":"new","folder":"opus","high_quality":false,"width":0,"height":0,"updated_at":"2026-11-11T04:46:01.904+01:00","label":"eng","size":21,"recording_url":"https://cdn.media.ccc.de/events/sps26/opus/import-110863-eng-Sentinel_Values_in_Python_Why_None_Is_Not_Enough_opus.opus","url":"https://api.media.ccc.de/public/recordings/107369","event_url":"https://api.media.ccc.de/public/events/08ec476d-fab4-41dc-9bcb-418ed3962767","conference_url":"https://api.media.ccc.de/public/conferences/sps26"},{"length":2089,"mime_type":"audio/mpeg","language":"eng","filename":"import-110863-eng-Sentinel_Values_in_Python_Why_None_Is_Not_Enough_mp3.mp3","state":"new","folder":"mp3","high_quality":false,"width":0,"height":0,"updated_at":"2026-11-11T04:46:05.648+01:00","label":"eng","size":32,"recording_url":"https://cdn.media.ccc.de/events/sps26/mp3/import-110863-eng-Sentinel_Values_in_Python_Why_None_Is_Not_Enough_mp3.mp3","url":"https://api.media.ccc.de/public/recordings/107370","event_url":"https://api.media.ccc.de/public/events/08ec476d-fab4-41dc-9bcb-418ed3962767","conference_url":"https://api.media.ccc.de/public/conferences/sps26"},{"length":2090,"mime_type":"video/webm","language":"eng","filename":"import-110863-eng-Sentinel_Values_in_Python_Why_None_Is_Not_Enough_webm-sd.webm","state":"new","folder":"webm-sd","high_quality":false,"width":720,"height":576,"updated_at":"2026-11-11T05:32:03.986+01:00","label":"eng 576p","size":87,"recording_url":"https://cdn.media.ccc.de/events/sps26/webm-sd/import-110863-eng-Sentinel_Values_in_Python_Why_None_Is_Not_Enough_webm-sd.webm","url":"https://api.media.ccc.de/public/recordings/107424","event_url":"https://api.media.ccc.de/public/events/08ec476d-fab4-41dc-9bcb-418ed3962767","conference_url":"https://api.media.ccc.de/public/conferences/sps26"}]}