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

gh-118310: Fix documentation for enum.Enum.__new__ #118311

Merged
merged 2 commits into from May 7, 2024

Conversation

mmEissen
Copy link
Contributor

@mmEissen mmEissen commented Apr 26, 2024

The provided example was incorrect:

  • The example enum was missing the int mixin as implied by the context
  • The value of int('1a', 16) was incorrectly given as 17 (should be 26)
  • The .. note tag was missing a space
  • Fix the indent to match other note tags

📚 Documentation preview 📚: https://cpython-previews--118311.org.readthedocs.build/

Copy link

cpython-cla-bot bot commented Apr 26, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@mmEissen
Copy link
Contributor Author

mmEissen commented Apr 26, 2024

The relevant part of the documentation Preview: link

The provided example was incorrect:
- The example enum was missing the `int` mixin as implied by the context
- The value of `int('1a', 16)` was incorrectly given as 17
  (should be 26)
- The `.. note` tag was missing a space
- Fix the indent to match other note tags
@eendebakpt
Copy link
Contributor

@mmEissen Thanks for making the PR. I checked the example locally and the link to the documentation. Looks good to me.

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks correct to me. Waiting for a module maintaner :)

@encukou
Copy link
Member

encukou commented May 7, 2024

I don't think we need Ethan's sign-off here.

@encukou encukou merged commit 48e52fe into python:main May 7, 2024
25 checks passed
@miss-islington-app
Copy link

Thanks @mmEissen for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 7, 2024
…118311)

The provided example was incorrect:
- The example enum was missing the `int` mixin as implied by the context
- The value of `int('1a', 16)` was incorrectly given as 17
  (should be 26)
(cherry picked from commit 48e52fe)

Co-authored-by: Momo Eissenhauer <mmEissen@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented May 7, 2024

GH-118699 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label May 7, 2024
encukou pushed a commit that referenced this pull request May 7, 2024
… (GH-118699)

gh-118310: Fix documentation for `enum.Enum.__new__` (GH-118311)

The provided example was incorrect:
- The example enum was missing the `int` mixin as implied by the context
- The value of `int('1a', 16)` was incorrectly given as 17
  (should be 26)
(cherry picked from commit 48e52fe)

Co-authored-by: Momo Eissenhauer <mmEissen@users.noreply.github.com>
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
…118311)

The provided example was incorrect:
- The example enum was missing the `int` mixin as implied by the context
- The value of `int('1a', 16)` was incorrectly given as 17
  (should be 26)
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.

None yet

5 participants