Ian Kelly <ian.g.ke...@gmail.com>:

> On Fri, May 25, 2018 at 11:00 PM, Chris Angelico <ros...@gmail.com> wrote:
>> On Sat, May 26, 2018 at 2:46 PM, Steven D'Aprano
>>> class State(Enum):
>>>     Maybe = 2
>>
>> # Tri-state logic
>> Maybe = object()
>
> The enum has a nice __str__ though.

That's why I usually use string sentinels:

  Maybe = "Maybe"


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to