jpmckinney / validictory

🎓 deprecated general purpose python data validator
Other
240 stars 57 forks source link

validate_enum() to accept any type of container #11

Closed aconrad closed 13 years ago

aconrad commented 13 years ago

I have made a small modification to the validate_enum() validator so it accepts any container, i.e. anything that implements contains.

My use case is to use the "enum" property with a set() / frozenset() so item lookup is much faster.

All tests still pass.

jamesturk commented 13 years ago

thanks for this, sounds good to me