Advanced parsing of structured data using Python's new match statement
- Track: Python
- Room: UD2.218A
- Day: Sunday
- Start: 09:00
- End: 09:30
- Video only: ud2218a
- Chat: Join the conversation!
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
Marc-André Lemburg |