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:
Todd Gamblin
2017-11-13 00:22:59 -07:00
committed by GitHub
parent 9b80f2fd38
commit fffcd77662

Diff Content Not Available