GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Enum Docs does MultiplesOfThree instead of PowersOfThree · Issue #100174 · python/cpython

Enum Docs does MultiplesOfThree instead of PowersOfThree #100174

New issue
Copy link
New issue
Copy link
Closed
Closed
Enum Docs does MultiplesOfThree instead of PowersOfThree#100174
Copy link
Assignees
ethanfurman
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir

Description

@Beweeted
Beweeted
opened on Dec 11, 2022
Issue body actions

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

  • gh-100174: [Enum] Correct PowersOfThree example. #100178
  • [3.11] gh-100174: [Enum] Correct PowersOfThree example. (GH-100178) #100181

Activity

  1. Beweeted
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Dec 11, 2022
  2. Beweeted
    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
  3. Beweeted commented on Dec 11, 2022

    @Beweeted
    Beweeted
    on Dec 11, 2022
    ContributorAuthor
    More actions

    Or I guess renaming it to ThirdPowers would also work.

  4. AlexWaygood
    assigned
    ethanfurman
    on Dec 11, 2022
  5. ethanfurman commented on Dec 11, 2022

    @ethanfurman
    ethanfurman
    on Dec 11, 2022
    Member
    More actions

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

  6. ethanfurman
    added a commit that references this issue on Dec 11, 2022

    gh-100174: [Enum] Correct PowersOfThree example. (GH-100178)

    868bab0
  7. miss-islington
    added 2 commits that reference this issue on Dec 11, 2022

    pythongh-100174: [Enum] Correct PowersOfThree example. (pythonGH-100178)

    4ce43b5

    gh-100174: [Enum] Correct PowersOfThree example. (GH-100178)

    593c5a0
  8. ethanfurman commented on Dec 12, 2022

    @ethanfurman
    ethanfurman
    on Dec 12, 2022
    Member
    More actions

    Many thanks!

  9. ethanfurman
    closed this as completedon Dec 12, 2022
  10. carljm
    added a commit that references this issue on Dec 14, 2022

    Merge branch 'main' into typedocs

    53d33a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @ethanfurman
    ethanfurman

Labels

docsDocumentation in the Doc dirDocumentation in the Doc dir

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.