-
Notifications
You must be signed in to change notification settings - Fork 218
Closed
Description
This is a ticket to explore the possibility of adding support for Python 3.4+ enums to voluptuous.
So far it's possible to write:
import enum
from voluptuous import In, Schema
class MyEnum(enum.Enum):
A = 'a'
B = 'b'
s = Schema(In(item.value for item in MyEnum))
s('a')but perhaps it would be nice if it could be written as the following?
s = Schema(In(MyEnum))or:
s = Schema(MyEnum)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels