Skip to content

Releases: scravy/awesome-pattern-matching

v0.24.4

29 Mar 14:21
Compare
Choose a tag to compare
  • bugfix release

v0.24.3

27 Mar 08:25
Compare
Choose a tag to compare
  • Some is now properly Hashable
  • Documented Parameters
  • Deprecated Arguments

v0.24.2

04 Jan 00:41
Compare
Choose a tag to compare
  • Fixes an issue with the _ (underscore) special key pattern when matching dictionaries

v0.24.1

03 Jan 22:57
Compare
Choose a tag to compare
  • Fixes an issue with Some in Some

v0.24.0

03 Jan 21:45
Compare
Choose a tag to compare
  • Adds case guards (when= and guarded)
  • Adds Remainder
  • Adds Object

v0.23.0

02 Jan 13:02
Compare
Choose a tag to compare
  • Fixes #8 which introduces a new Feature, see description in pull #9

This allows Some(*) to match subsequences.

Previously Some(...) would only match individiual items, i.e. the pattern [0, Some(1), 2] would match the value [0, 1, 1, 1, 2]. Compared with a regex on strings this would be like 01*2 but the repetition here could not be applied to subsequences 0(12)*3. This pull request introduces the ability for Some(*) to take multiple patterns which it then tries to match as a sequence within: [0, Some(1, 2), 3] would now match the value [0, 1, 2, 1, 2, 3]. This could not be expressed before.

Note that the new syntax is different from Some([1, 2]) as this would match items which are themselves lists, i.e. [0, [1, 2], [1, 2], 3].

v0.22.0

12 May 03:18
Compare
Choose a tag to compare
Fix version number to follow SemVer

v0.21.2

24 Apr 03:44
Compare
Choose a tag to compare

v0.21.1

17 Apr 12:11
Compare
Choose a tag to compare
  • track python 3.10 development, compatible with alpha7

v0.20.0

06 Feb 05:06
Compare
Choose a tag to compare
  • Added an .explain() which can help with understanding why a match did not succeed