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

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

Avatar for Jordan Duabe Jordan Duabe
September 30, 2026

[PyCon Davao 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

September 30, 2026

More Decks by Jordan Duabe

Other Decks in Programming

Transcript

  1. whoami Jordan Duabe Software Engineer at Anaqua - – -

    : – - 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 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 The BDFL, having shepherded Python development for 20

    years, officially announces his retirement effective immediately. Following a unanimous vote, his replacement is named.
  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. 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
  6. 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 - •