Allow types and 'any' in variant definitions. (#4524)
- Previously variant values had to be a tuple or a callable predicate. - This allows 'any' as shorthand for `lambda x: True` and type objects as shorthand for "any value of this type". - Makes variant definitions more readable, keeps lambdas out of packages for common cases.
This commit is contained in:
parent
9b80f2fd38
commit
fffcd77662