Skip to content

Unclear meaning of _Private__names in enum docs. #88340

Closed

Description

@gpshead
BPO 44174
Nosy @gpshead, @ethanfurman, @Fidget-Spinner, @joeriddles
PRs
  • bpo-44174: [Enum] add reference to name mangling #29116
  • [3.10] bpo-44174: [Enum] add reference to name mangling #29117
  • [3.9] bpo-44174: [Enum] add name-mangling reference #29128
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-10-21.18:33:16.931>
    created_at = <Date 2021-05-19.03:27:49.970>
    labels = ['easy', '3.11', '3.9', '3.10', 'docs']
    title = 'Unclear meaning of _Private__names in enum docs.'
    updated_at = <Date 2021-10-21.18:33:16.931>
    user = 'https://github.com/gpshead'

    bugs.python.org fields:

    activity = <Date 2021-10-21.18:33:16.931>
    actor = 'ethan.furman'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2021-10-21.18:33:16.931>
    closer = 'ethan.furman'
    components = ['Documentation']
    creation = <Date 2021-05-19.03:27:49.970>
    creator = 'gregory.p.smith'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44174
    keywords = ['patch', 'easy', 'newcomer friendly']
    message_count = 8.0
    messages = ['393919', '393939', '393960', '404517', '404524', '404565', '404618', '404633']
    nosy_count = 5.0
    nosy_names = ['gregory.p.smith', 'docs@python', 'ethan.furman', 'kj', 'joeriddles']
    pr_nums = ['29116', '29117', '29128']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue44174'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    Activity

    1. gpshead commented on May 19, 2021

      @gpshead
      MemberAuthor

      https://docs.python.org/3/library/enum.html#private-names

      """
      _Private__names

      Private names will be normal attributes in Python 3.10 instead of either an error or a member (depending on if the name ends with an underscore). Using these names in 3.9 will issue a DeprecationWarning.
      """

      It isn't clear from this documentation what is meant by "private names". Please expand on this to be explicit about what name pattern is being described.

    2. added
      docsDocumentation in the Doc dir
      3.11only security fixes
      on May 19, 2021
    3. Fidget-Spinner commented on May 19, 2021

      @Fidget-Spinner
      Member

      I think linking to this part of the docs may help https://docs.python.org/3/reference/expressions.html#atom-identifiers

      There's also already a label to reference to, so
      the sentence could start with :ref:`Private names <private-name-mangling>`.

    4. ethanfurman commented on May 19, 2021

      @ethanfurman
      Member

      Looks good. Patches welcome. :-)

    5. joeriddles commented on Oct 20, 2021

      joeriddlesmannequin
      Mannequin

      _Private__names seems to no longer exist in the Python 3.11 documentation.

      https://docs.python.org/3.11/library/enum.html#private-names

      It appears to have been removed in this PR https://github.com/python/cpython/pull/23748/files

      Should this issue be updated to remove Python 3.11 from the Versions?

    6. ethanfurman commented on Oct 20, 2021

      @ethanfurman
      Member

      It has been moved to the tutorial (links are at the top of the Enum page).

    7. ethanfurman commented on Oct 21, 2021

      @ethanfurman
      Member

      New changeset 7c4d961 by Ethan Furman in branch 'main':
      bpo-44174: [Enum] add reference to name mangling (GH-29116)
      7c4d961

    8. ethanfurman commented on Oct 21, 2021

      @ethanfurman
      Member

      New changeset 828722a by Ethan Furman in branch '3.10':
      [3.10] bpo-44174: [Enum] add reference to name mangling (GH-29117)
      828722a

    9. ethanfurman commented on Oct 21, 2021

      @ethanfurman
      Member

      New changeset e628700 by Ethan Furman in branch '3.9':
      [3.9] bpo-44174: [Enum] add name-mangling reference (GH-29128)
      e628700

    10. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of life3.11only security fixes3.9 (EOL)end of lifedocsDocumentation in the Doc direasy

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions