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 YoSTEALTH
Recipients YoSTEALTH, docs@python
Date 2020-01-06.19:10:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1578337839.24.0.759731756128.issue39234@roundup.psfhosted.org>
In-reply-to
Content
# enum in C
# ---------
enum {
    a,
    b,
    c
}
# a = 0
# b = 1
# b = 2

# enum in Python
# --------------
class Count(enum.IntEnum):
    a = enum.auto()
    b = enum.auto()
    c = enum.auto()
# a = 1
# b = 2
# b = 3


I am not sure why the `enum.auto()` starts with 1 in Python but this has just wasted a week worth of my time.
History
Date User Action Args
2020-01-06 19:10:39YoSTEALTHsetrecipients: + YoSTEALTH, docs@python
2020-01-06 19:10:39YoSTEALTHsetmessageid: <1578337839.24.0.759731756128.issue39234@roundup.psfhosted.org>
2020-01-06 19:10:39YoSTEALTHlinkissue39234 messages
2020-01-06 19:10:39YoSTEALTHcreate