contracts icon indicating copy to clipboard operation
contracts copied to clipboard

Improve string support

Open dalbani opened this issue 12 years ago • 0 comments

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.

dalbani avatar Dec 18 '12 12:12 dalbani