-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-39234: enum.auto()
default initial value as 1
#17878
Conversation
enum in C starts at 0, while `enum.auto()` in Python starts at 1, thus needs to be specified.
@ethanfurman this should back-port all the way to 3.6 as |
Doc/library/enum.rst
Outdated
@@ -55,7 +55,7 @@ helper, :class:`auto`. | |||
|
|||
.. class:: auto | |||
|
|||
Instances are replaced with an appropriate value for Enum members. | |||
Instances are replaced with an appropriate value for Enum members. By default, the initial value starts at 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're missing the trailing period. Sorry for all of the minor fixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no worries, added the "."
thanks Eric
@YoSTEALTH: Status check is done, and it's a success ✅ . |
Thanks @YoSTEALTH for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7, 3.8. |
Sorry, @YoSTEALTH, I could not cleanly backport this to |
Sorry @YoSTEALTH, I had trouble checking out the |
Sorry, @YoSTEALTH, I could not cleanly backport this to |
Updated as Eric mentioned "By default, the initial value starts at 1" https://bugs.python.org/issue39234 Automerge-Triggered-By: @ericvsmith. (cherry picked from commit 24bcefc) Co-authored-by: YoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>
Updated as Eric mentioned "By default, the initial value starts at 1" https://bugs.python.org/issue39234 Automerge-Triggered-By: @ericvsmith. (cherry picked from commit 24bcefc) Co-authored-by: YoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>
Updated as Eric mentioned "By default, the initial value starts at 1" https://bugs.python.org/issue39234 Automerge-Triggered-By: @ericvsmith. (cherry picked from commit 24bcefc) Co-authored-by: YoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>
Updated as Eric mentioned "By default, the initial value starts at 1" https://bugs.python.org/issue39234 Automerge-Triggered-By: @ericvsmith
Updated as Eric mentioned "By default, the initial value starts at 1"
https://bugs.python.org/issue39234
Automerge-Triggered-By: @ericvsmith