|
|
|
|
|
by bow_
2745 days ago
|
|
Looks neat! Pattern matching is one of those features that I sorely miss when I have to program in Python. I do feel a bit wary seeing this[1] though, given that `_` can be considered a special character in Python. I suppose you can use `ANY` instead of `_` in the pattern matches, but of course that would not look as clean. [1] https://github.com/santinic/pampy/blob/4c8e6e0cabada82a5ed79... |
|
EDIT: So it turns out that pampy already has a more explicitly named alternative to "_" called "ANY". So anybody who doesn't like the _ syntax can use "from pampy import ANY" and use that instead.