Enums: making a single enum

Ethan Furman ethan at stoneleaf.us
Sat May 26 13:38:11 EDT 2018


On 05/26/2018 01:00 AM, Steven D'Aprano wrote:
> I wish there was a simpler way to define symbols with identity but no
> state or behaviour...

Check out the Constant class in aenum. You still might want to customize the repr, though.
--
~Ethan~


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /