This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ethan.furman
Recipients alex, eric.smith, ethan.furman, ncoghlan
Date 2013-05-12.10:44:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Another approach to handling this, and other, issues is to allow options to EnumMeta.  My original aenum code had the default Enum class as unordered, no duplicates allowed, non-indexable, etc., but then allowed options to be passed in such as DUPLICATES to allow duplicates, ORDERED to add the ge-gt-le-lt methods, INDEXED to add __index__, etc.

For the aliasing issue this method is more robust as placeholders are not required, and code like this will work:

class Physics(Enum):
    e = 2.81847
    pi = 3.141596
    tau = 2 * pi

To make that code work with placeholders is possible (I have it in aenum) but a major pain (I was about to remove it before my offer to help with ref435 was accepted).
Date User Action Args
2013-05-12 10:44:26ethan.furmansetrecipients: + ethan.furman, ncoghlan, eric.smith, alex
2013-05-12 10:44:26ethan.furmansetmessageid: <>
2013-05-12 10:44:26ethan.furmanlinkissue17959 messages
2013-05-12 10:44:25ethan.furmancreate