~/talk

Let's implement useless Python objects

Talkat PythonAsia 2026 · on Saturday, 2026-03-21· at 15:30· Teresa Yuchengco Auditorium (Main Hall)· [python, creative-coding]
links:none on file
slides:none on file

Implements a set of intentionally broken collection classes that obey Python protocols but produce wrong results: a liar container where "in" always flips, a Fibonacci size where len(range(50)) returns the 50th Fibonacci (~20 billion) instead of 50, and a shuffle iterable that yields a new random order on each for-loop. Uses collections.abc abstract base classes and dunder methods (__contains__, __len__, __iter__, __getitem__) to compose and combine these behaviors and exposes surprising side effects like infinite count.

AI-written summary · about

  1. 0:00Introduction
  2. 2:52Useless Python objects
  3. 9:11Python object protocols
  4. 13:04Abstract base classes
  5. 15:12Modular sequences
  6. 19:06Misprinted dict & frozenset
  7. 23:31Key takeaways
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.