PyCon Sweden 2026

Let's talk about ...

Not a cliffhanger! The … is the very topic of this talk! The "Ellipsis" is an often-overlooked part of the python language specification. It's a built-in singleton object with some niche but very practical uses!

The Ellipsis can be used to describe "arbitrary length", "intentional incompleteness" or a sentinel value where None, 0 or False carries different meaning. It is hashable, comparable, safe to use as method argument default, and even works in modern match statements! Let's look at how it's implemented and practical examples of where it's useful.


We'll dive into the python language spec, specifically the Ellipsis. It's a built-in part of the language that has some niche uses but is, I think, underused. It's acutally quite useful in many circumstances and I want to shed some light on this.

We can compare it to _, and similar concepts in other languages. You may have seen it used in type hints for callables and for protocols. There are cases where None is a valid value, for example as empty blocks in configuration objects, where ... adds more meaning rather than None or 0, which could mean something in itself.

There is also a new sentinel value generator being added to python 3.15+ which we will also look at.

Marcus Näslund

Has been tinkering with code in some form for the past 20 years, currently a software engineer at SSC Space, and a popular science author with his latest book "En Summa av Ögonblick" in stores now. Passionate about education, mathematics, chess, and opinionated style checkers.