Pampy

Latest version: v0.2.1

Safety actively analyzes 683530 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.2.1

Fixed Python3 dataclass behaviour, added `default` parameter to `match` function.

0.1.10

Pampy supports Python 3.7 dataclasses. You can pass the operator `_` as arguments and it will match those fields.

python
dataclass
class Pet:
name: str
age: int

pet = Pet('rover', 7)

match(pet, Pet('rover', _), lambda age: age) => 7
match(pet, Pet(_, 7), lambda name: name) => 'rover'
match(pet, Pet(_, _), lambda name, age: (name, age)) => ('rover', 7)

0.1.9

Fixed match_value() with == instead of "is"

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.