Skip to content
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

Merged
merged 5 commits into from
Jan 6, 2020
Merged

bpo-39234: enum.auto() default initial value as 1 #17878

merged 5 commits into from
Jan 6, 2020

Conversation

YoSTEALTH
Copy link
Contributor

@YoSTEALTH YoSTEALTH commented Jan 6, 2020

Updated as Eric mentioned "By default, the initial value starts at 1"

https://bugs.python.org/issue39234

Automerge-Triggered-By: @ericvsmith

enum in C starts at 0, while `enum.auto()` in Python starts at 1, thus needs to be specified.
@YoSTEALTH
Copy link
Contributor Author

@ethanfurman this should back-port all the way to 3.6 as enum.auto() was first added in 3.6

@@ -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
Copy link
Member

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.

Copy link
Contributor Author

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

@miss-islington
Copy link
Contributor

@YoSTEALTH: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 24bcefc into python:master Jan 6, 2020
@miss-islington
Copy link
Contributor

Thanks @YoSTEALTH for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7, 3.8.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @YoSTEALTH, I could not cleanly backport this to 3.8 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 24bcefcb74231476b055bb6f0726642abeb10f04 3.8

@miss-islington miss-islington self-assigned this Jan 6, 2020
@miss-islington
Copy link
Contributor

Sorry @YoSTEALTH, I had trouble checking out the 3.7 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 24bcefcb74231476b055bb6f0726642abeb10f04 3.7

@miss-islington
Copy link
Contributor

Sorry, @YoSTEALTH, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 24bcefcb74231476b055bb6f0726642abeb10f04 3.6

ericvsmith pushed a commit that referenced this pull request Jan 7, 2020
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>
ericvsmith pushed a commit that referenced this pull request Jan 7, 2020
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>
ericvsmith pushed a commit that referenced this pull request Jan 7, 2020
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>
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
Updated as Eric mentioned "By default, the initial value starts at 1"


https://bugs.python.org/issue39234



Automerge-Triggered-By: @ericvsmith
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants