
May 3, 2013
12:01 a.m.
On May 03, 2013, at 09:14 AM, Nick Coghlan wrote:
The other issue is your proposal to have a class-based convenience syntax akin to (correct me if I got this wrong):
class Animal(Enum): __values__ = 'cat dog'
I would suggest moving the field names into the class header for a class based convenience API:
class Animal(Enum, members='cat dog'): pass
Wait, what is this trying to solve? "Convenience API" is really a shorthand for "functional API". Two very different use cases that the above suggestion doesn't address. IMHO, it's not worth giving up the functional API for picklability if the technical problems cannot be resolved, especially given we already have the same problem for namedtuples. -Barry