Message188893
Two requests:
1. Lose the frame hack. With the explicit "module=__name__" API available, the implicit fragile magic isn't necessary and leads to Enum instances that may or may not support pickling depending on the implementation. Better to say "if you use the functional API without passing the module name, your Enum instances won't support pickling".
2. Mike Bayer (SQL Alchemy author) has requested the ability to derive a custom metaclass that turns off the Enums-with-members-are-final subclassing restriction (relaxing the rule that members of an enum are instances of that enum to "members of an enum are instances of that enum, or one of its parent enums", but otherwise keeping the same behaviour as the standard enums).
Barry would probably appreciate this capability, too ;)
We don't need to explicitly support this for the initial patch (besides, as I read the current code, you can get something like this already just by overriding EnumMeta._get_mixins), but we may want to revisit it as a supported subclassing API at some point in the future. |
|
Date |
User |
Action |
Args |
2013-05-11 03:09:06 | ncoghlan | set | recipients:
+ ncoghlan, barry, ezio.melotti, alex, eli.bendersky, docs@python, ethan.furman, zach.ware |
2013-05-11 03:09:06 | ncoghlan | set | messageid: <1368241746.54.0.0191259394505.issue17947@psf.upfronthosting.co.za> |
2013-05-11 03:09:06 | ncoghlan | link | issue17947 messages |
2013-05-11 03:09:06 | ncoghlan | create | |
|