Skip to main content Brad's PyNotes

Posts on Language Features

  1. PEP 570 Positional Only

    TL;DR

    PEP 570 introduced the / separator to mark positional-only parameters, giving API designers control over function call semantics and preventing keyword argument usage.

  2. PEP 622 Pattern Matching

    TL;DR

    PEP 622 introduced match-case statements for structural pattern matching, enabling elegant destructuring and dispatch based on data shape and values.

    Interesting!

    Pattern matching brings functional programming elegance to Python - you can destructure complex nested data in a single line and handle different cases cleanly!