PyCon Redux
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage


PyCon USA 2022 general information:

  • Location: Salt Palace Convention Center in Salt Lake City, UT
  • Talks: Friday April 29th to Sunday May 1st
  • Conference schedule
PyCon opening in the Grand Ballroom
PyCon opening in the Grand Ballroom

Day 1

Łukasz Langa is the Python Software Foundation’s developer in residence, author of PEP 563, and a black maintainer.

Notable sayings from the talk:

  • Ugly type hints expose ugly code
  • Be vague in what you accept, and specific in what you return

This talk on structural pattern matching (the match statement) was given by PEP 634’s coauthor Brandt Bucher.

Notable sayings from the talk:

  • Structural pattern matching is not a switch statement!
  • Want practice? Implement a red-black tree with structural pattern matching
An instructive talk on how to add new syntax (in this case, a pipe | operator) to Python.
Issues in third party dependencies, or worse indirect third party dependencies, can often feel like a blocker. Here, Paul Ganssle discusses handling bugs in third party libraries with a decision-tree like framework.
Jason Fried is a pioneer of Python at Facebook, and gave a wisdom-filled talk on using asyncio at scale. He comically made it seem like he has learned many lessons the hard way.

Day 2

Peter Wang co-founded Anaconda, and gave quite a hopeful talk on the future of Python.

He described the collective motion from client-server towards client-only compute, while discussing PyScript, a JavaScript competitor to run Python in HTML backed by WASM.

Pablo Galindo Salgado, the Python 3.10 and 3.11 release manager, gave this talk on his co-authored PEP 657.

One fascinating fact about Pablo is he received a PhD in theoretical math and physics before becoming a software engineer. In general, he’s a captivating speaker and his talk shares great perspective.

Some background is PEP authors are required to be objective, which can be challenging if one really believes in something. Please read PEP 1 for more information on what’s required of PEP authors.

PEP 660 (accepted) and PEP 662 (rejected) were competing PEPs around editable installations. Bernát Gábor, the maintainer of tox, stepped up to champion PEP 662, which ultimately lost out. Overall, this talk provides real insight into how the Python packaging sausage gets made.

Python is quite a dynamic language, and this talk imbibes a deeper appreciation for its dynamism. Kevin Modzelewski (kmod) is a maintainer of Pyston, a performance-optimizing JIT for Python, and gave this talk analyzing modern Python interpreters’ performance.

Two useful tools shared were the Python Speed Center, which analyzes Python speed changes for each commit, and pyperformance, a benchmarking tool. Secondly, a notable saying from his talk:

  • Python’s dynamic features are not free, increasingly so in newer versions

Microsoft has a team working on making Python faster (over 25% for Python 3.11), called the “Faster CPython” team. Brandt Bucher (gave the match statement talk) and Anthony Shaw (gave this talk) are both team members.

A savvy point made is to only optimize when there’ll be a > 10% performance gain, otherwise observed improvement may just be CPU noise. This talk will teach you about speed: using __slots__, not using dataclasses, and removing helper functions. It also suggests multiple tools:

  • The memory profiler Scalene
  • For immediate huge performance gains, just switch Python interpreter: Pyston (maintainer Kevin Modzelewski gave the performant code talk), Cython (called “cythonizing”), or PyPy (JIT)

Day 3

Pandy Knight discussing the Pikachu on his pants
Pandy Knight discussing the Pikachu on his pants
A thought-provoking systems talk given by Anvil founder Meredydd Luff, giving insight into a code completer’s implementation.

Miscellaneous Facts and Sayings

Memorable quotes:

  • “If you bash your head against a wall enough times, it becomes a pile of YAML”
  • “Duck typing paradigm: speak in terms of behaviors (not types)”
  • “Make impossible values unrepresentable”
  • “Focus on building things that solve people’s problems”
  • “Live and die on your engineering”

Miscellaneous tooling findings:

  • Several tools used Rust bindings for a no-GIL backend
  • Typed your code? Compile your code to C extensions with mypyc for 10X speed boost
  • Instagram is fully Python, both frontend and backend, and wrote a performance-oriented CPython 3.8-based runtime Cinder
  • attrs is similar to dataclasses but has a big performance gain via __slots__
  • Pants build intelligently caches unit tests for super fast CI (from this talk)
    • Think: only running relevant tests, not entire test suite
  • Semgrep easily create linting rules for your domain’s specifics