Pattern Matching. A cleaner way to check and unpack data structures in Python.

github.com/gvanrossum/patma

Vaya's read on this project

Problem, audience, market, and the verdict — sign in to see it.

Updates

June 2022
  • Fix typos in tutorial_basics.md. (#180)
November 2021
  • [binder] Fix typo in widgets list (#179)
March 2021
  • PEP 636: Replace assignment expression with as-pattern (#172)
February 2021
  • Fix small typo in README.md (#170)
  • Update README.md to new PEPs
  • Fix typo in README.md (#169)
November 2020
  • Fix typo in README.md (#164)
October 2020
  • [binder] Fix typo in widgets list
  • Fix tutorial to use 'as' instead of ':='
  • Add JSON pets example
September 2020
  • Mention that True/False/None use 'is', not '=='
  • Fix typo in tutorial_basics (#152)
August 2020
  • Create tutorial_basics.md
July 2020
  • Move fields/posargs checks to __init__
  • Don't support __match__, and support __match_args__ right
  • Change ValuePattern to pure equivalence checks
  • Get rid of AnnotatedPattern
  • Rename InstancePattern to ClassPattern
  • Use TypeError instead of our own exceptions
  • Fix comments and test names, add WildcardPattern