contracts
contracts copied to clipboard
Improve string support
Hello,
Starting from a very simple integer-related contract:
int,(-1 | 1)
I've tried to write the same kind of contract, but for string values, e.g.:
string,(a | b)
Unfortunately, that syntax is not accepted by PyContracts.
It would also be nice to introduce regexp in contracts, to be matched against string values.
Thanks.