Brussels / 1 & 2 February 2025

schedule

Advanced parsing of structured data using Python's new match statement


The match statement was introduced in Python 3.10, but has not yet seen wide adoption.

In this talk, I'd like to showcase a few more advanced use cases to demonstrate it's expressiveness and versatility, compared to classic parsers using if-elif-else chains, in the hope of attracting a few more Python users to the new concept in Python.

We will have a look at parsing JSON, XML and ASTs, and also compare performance to the classic parsing strategy.

Knowledge of how the match statement works and familiarity with at least one of JSON, XML and ASTs are prerequisite for this talk.

Speakers

Photo of Marc-André Lemburg Marc-André Lemburg

Links