Skip to content

Enum Docs does MultiplesOfThree instead of PowersOfThree #100174

Description

@Beweeted

Documentation

Current:
The example includes a class PowersOfThree. Inside the function _generate_next_value_(), it executes return (count + 1) * 3 (Line 5), which is multiples of three instead of powers of three.

Expected:
Line 5 should be updated to: return 3 ** (count + 1), and the output on Line 9 should be updated to 9.
OR
Line 2 and Line 8 should be updated to MultiplesOfThree

https://docs.python.org/3/library/enum.html#enum.Enum._generate_next_value_

Linked PRs

Activity

  1. changed the title [-]Enum Docs do the wrong math for the class name in the _generate_next_value_ example[/-] [+]Enum Docs does MultiplesOfThree instead of PowersOfThree[/+] on Dec 11, 2022
  2. Beweeted commented on Dec 11, 2022

    @Beweeted
    ContributorAuthor

    Or I guess renaming it to ThirdPowers would also work.

  3. ethanfurman commented on Dec 11, 2022

    @ethanfurman
    Member

    Let's fix the math. @Beweeted would you like to create the PR?

  4. added a commit that references this issue on Dec 11, 2022
  5. added 2 commits that reference this issue on Dec 11, 2022
  6. ethanfurman commented on Dec 12, 2022

    @ethanfurman
    Member

    Many thanks!

  7. added a commit that references this issue on Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dir

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions