Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[PyCon JP 2026] So You Think You Know Python?

Avatar for Jordan Duabe Jordan Duabe
August 21, 2026
0

[PyCon JP 2026] So You Think You Know Python?

Python is a language full of delightful surprises, if you know where to look. This talk takes you on a guided tour of its most interesting quirks, from easter eggs buried in the standard library, to real-world examples of how the language's gotchas have tripped up even the most seasoned developers.

This talk goes through code, documentation, PEPs, mailing list threads, discussions in issue trackers, webcomics, and other sources to get the answers to the following questions (and more):

- Is midnight falsy?
- Why does `~True` equal -2?
- What is the hash of infinity?
- How many references to xkcd webcomics are in the standard library?
- Why can't raw strings end with an odd number of backslashes?

Avatar for Jordan Duabe

Jordan Duabe

August 21, 2026

Transcript

  1. whoami Jordan Duabe Software Engineer at Anaqua [email protected] @[email protected] Images

    (cropped) from L to R: Виктор В, CC BY-SA 3.0 — Pedro Szekely from Los Angeles, USA, CC BY-SA 2.0 — Nestek, CC BY-SA 4.0 (all via Wikimedia Commons) First World Metal Problems meme via Know Your Meme — Photos by Jordan Duabe
  2. PEP 20 – The Zen of Python Abstract Long time

    Pythoneer Tim Peters succinctly channels the BDFL’s guiding principles for Python’s design into 20 aphorisms, only 19 of which have been written down.
  3. PEP 401 – BDFL Retirement Summary The BDFL, having shepherded

    Python development for 20 years, officially announces his retirement effective immediately (Barry Warsaw aka Uncle Barry aka FLUFL). His official title is now Benevolent Dictator Emeritus Vacationing Indefinitely from the Language (BDEVIL). Guido trains for his lifelong dream of climbing Mount Everest.
  4. XKCD 936 Generate an XKCD-style passphrase: import secrets # On

    standard Linux systems, use a convenient dictionary file. # Other platforms may need to provide their own word-list. with open('/usr/share/dict/words') as f: words = [word.strip() for word in f] password = ' '.join(secrets.choice(words) for i in range(4))
  5. Re: Please reconsider the Boolean evaluation of midnight If I

    had to do it over again I would *definitely* never make a time value "falsy". The datetime module was conceived long ago, when the dangers of falsy objects that weren't clearly trying to be "like numbers" or "like collections" weren't so clear. Today I would argue that times aren't enough "like numbers" to qualify. --Guido van Rossum (python.org/~guido)
  6. Buggy code in backend server 257 257 if appointment.time_slot_id is

    ts.id: time_slot_appointments.append(appointment) Source: What a Bug can Teach You about Python by Brad Dettmer
  7. Sources • • • • • • • • •

    https://hub.docker.com/r/j4ckofalltrades/legacy-python https://mail.python.org/pipermail/python-list/1999-June/001951.html https://docs.python.org/3/faq/design.html#why-can-t-raw-strings-r-strings-end-with-a-backslash https://docs.python.org/3/library/secrets.html https://lwn.net/Articles/590299/ https://lwn.net/Articles/590331/ https://sethmlarson.dev/deprecations-via-warnings-dont-work-for-python-libraries https://docs.python.org/3/c-api/long.html#:~:text=CPython,object https://docs.google.com/presentation/d/1mDeGnYlkYEvIuAfEGTyTk-vUaYvALkdqfnuGIRqz0Hs
  8. Image credits • "Australia relief map" by Виктор В, CC

    BY-SA 3.0 (creativecommons.org/licenses/by-sa/3.0). Source: en.wikipedia.org/wiki/File:Australia_relief_map.jpg • "Rottnest Island coastline near Parker Point 01" by Pedro Szekely, CC BY-SA 2.0 (creativecommons.org/licenses/by-sa/2.0). Source: commons.wikimedia.org/wiki/File:Rottnest_Island_coastline_near_Parker_Point_01.jpg • "Quokkas Closeup" by Nestek, CC BY-SA 4.0 (creativecommons.org/licenses/by-sa/4.0). Source: commons.wikimedia.org/wiki/File:Quokkas_Closeup.jpg • "First World Metal Problems" meme, via Know Your Meme. Source: knowyourmeme.com/photos/426359-first-world-metal-problems