On Sat, May 26, 2018 at 6:00 PM, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > Actually I don't really need all the features of Enums, I might just > define my own class: > > > class Maybe: > def __repr__(self): > return "Maybe" > > Maybe = Maybe() > > > > I wish there was a simpler way to define symbols with identity but no > state or behaviour...
You DO have behaviour though - the repr is a behaviour of that object. So what you have there (reusing the name for the instance) seems decent to me. ChrisA -- https://mail.python.org/mailman/listinfo/python-list