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 David Rebbe2, eric.smith, ethan.furman, veky
Date 2021-08-25.19:25:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1629919509.6.0.0285212128399.issue44993@roundup.psfhosted.org>
In-reply-to
Content
David, I added a PR for the Enum handling/creation in the ics library.  Syncing values with external libraries is definitely *not* what `auto` is intended for.

As for why enum members evaluate as True:  most objects in Python evaluate to True, unless they have a reason not to (such as an empty container or the number 0).  One of the main ideas behind the creation of Enum is that the exact values didn't usually matter,  but when they did they would be specified.  `auto()` was added later to make the "doesn't usually matter" case easier.

---

Vedran, or `cEnum`?  ;-)

One concern is should cEnum be Python's `int`, or a c_type int?  That should be in a new issue, though.

Okay, it's Issue45004.
History
Date User Action Args
2021-08-25 19:25:09ethan.furmansetrecipients: + ethan.furman, eric.smith, veky, David Rebbe2
2021-08-25 19:25:09ethan.furmansetmessageid: <1629919509.6.0.0285212128399.issue44993@roundup.psfhosted.org>
2021-08-25 19:25:09ethan.furmanlinkissue44993 messages
2021-08-25 19:25:09ethan.furmancreate