Awesome Pattern Matching Versions Save

Pattern Matching for Python 3.7+ in a simple, yet powerful, extensible manner.

0.19.0

3 years ago
  • MatchContext.match matches collection patterns if type matches exactly
  • Add support for using range as a pattern
  • 100% test (line and branch) coverage

0.18.0

3 years ago
  • Added typefoo module (Parameters, KwArgs, VarArgs, see tests)
  • Added Attrs
  • Except for newly added typefoo module, everything has 100% branch and line coverage

0.17.0

3 years ago
  • Added captureall argument to match
  • Improved nesting Capture patterns

0.16.0

3 years ago
  • Match can now propagate match-options too
  • case and of accept match-options
  • strict option properly makes collection comparisons deeply strict

0.15.1

3 years ago
  • Add pycoverage definitions
  • Coverage ≥ 90%
  • Streamline few code paths
  • Add tests

0.15.0

3 years ago
  • _ in keys won't lock the matched key to the value pattern (this is a more intuitive behavior)
  • Add support for matching and capturing types directly in the short-hand match style (compatible with pampy)

0.14.0

3 years ago
  • Add bind_groups to Regex
  • Rework dictionary pattern matching logic - allows for patterns in keys now (see the tests)
  • Removed argresult= kwarg to match - MatchResult now implements __getattr__ by default

0.13.0

3 years ago
  • Add .bind() to MatchResult for having a nicer API experience in Python 3.7 which lacks :=
  • Truish() is not IsTruish

0.12.0

3 years ago
  • Added support for Python 3.7
  • Added support for PyPy 3.7
  • Added support for dataclasses

0.11.0

3 years ago
  • Make MatchResult inherit from collections.Mapping such that it can be used as **kwargs