bckohan / enum-properties

Add properties and method specializations to Python enumeration values with a simple declarative syntax.
https://enum-properties.rtfd.io
MIT License
18 stars 0 forks source link

Allow @specialize to accept a list of enumeration values. #43

Closed bckohan closed 1 year ago

bckohan commented 1 year ago

Should be able to do something like:


class MyEnum(EnumProperties):

    VAL1 = 1
    VAL2 = 2
    VAL3 = 3

   @specialize(VAL1, VAL2)
   def method(self):
        ...