Re: [Python-Dev] Enumeration items: `type(EnumClass.item) is EnumClass` ?

April 29, 2013
3:04 p.m.
On Apr 29, 2013, at 7:32 AM, Ethan Furman wrote:
This decision seems natural to me, so I wrote an enumeration library some time ago that uses a simple metaclass to achieve "type(Season.spring) is Season": https://github.com/sampsyo/beets/blob/master/beets/util/enumeration.py The module has other warts but perhaps it can be helpful anyway. Cheers, Adrian
4341
Age (days ago)
4341
Last active (days ago)
0 comments
1 participants
participants (1)
-
Adrian Sampson