trafaret/Enum: support Python >=3.4 `enum` module
Fix #60 PR
Except filling rule is different. Fill from enum keys. Cause by default enum lib support getting by key, not by value.
class MyEnum(enum.Enum):
me = 'developer'
>>> MyEnum['me']
<MyEnum.me: 'developer'>
I think it's more clear and straightforward
@Deepwalker what do you think?
Not sure about your keys not values approach. What do you want to check after all? And path of trafaret is not to create big bloated classes that can work with anything. Can we create special trafaret that works with Enum classes? There is no need to this magic when you create trafaret. You know exactly what you want to check, so dont be oversmart, let people just say that they want to check Enum class, not a bunch of strings. This is how I see it.