Skip to content

pprint -> underscore_numbers argument not working #89720

Closed

Description

@jpvincent1980
BPO 45557
Nosy @ericvsmith, @miss-islington, @jpvincent1980
PRs
  • bpo-45557: Fix underscore_numbers in pprint.pprint(). #29129
  • [3.10] bpo-45557: Fix underscore_numbers in pprint.pprint(). (GH-29129) #29133
  • Files
  • image.png
  • 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.21:54:47.469>
    created_at = <Date 2021-10-21.19:48:33.014>
    labels = ['3.10', '3.11']
    title = 'pprint -> underscore_numbers argument not working'
    updated_at = <Date 2021-10-21.21:54:47.468>
    user = 'https://github.com/jpvincent1980'

    bugs.python.org fields:

    activity = <Date 2021-10-21.21:54:47.468>
    actor = 'eric.smith'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-10-21.21:54:47.469>
    closer = 'eric.smith'
    components = []
    creation = <Date 2021-10-21.19:48:33.014>
    creator = 'jpvincent'
    dependencies = []
    files = ['50385']
    hgrepos = []
    issue_num = 45557
    keywords = ['patch']
    message_count = 5.0
    messages = ['404636', '404640', '404643', '404651', '404664']
    nosy_count = 3.0
    nosy_names = ['eric.smith', 'miss-islington', 'jpvincent']
    pr_nums = ['29129', '29133']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue45557'
    versions = ['Python 3.10', 'Python 3.11']

    Activity

    1. jpvincent1980 commented on Oct 21, 2021

      jpvincent1980mannequin
      MannequinAuthor

      Hello,

      I just tried the new attribute underscore_numbers with pprint, it doesn't work for me. I'm working on Windows.

      [cid:8779885d-01bf-4162-9427-a44de152f7ac]

      Best regards,

      Jean-Philippe

    2. changed the title [-]Issue 42914[/-] [+]pprint -> underscore_numbers argument not working[/+] on Oct 21, 2021
    3. changed the title [-]Issue 42914[/-] [+]pprint -> underscore_numbers argument not working[/+] on Oct 21, 2021
    4. ericvsmith commented on Oct 21, 2021

      @ericvsmith
      Member

      Please do not post screen shots. They don't work for people with vision impairments, and we can't copy and past from them, so it makes it harder for us to help you.

      It looks like it works with pformat, and not pprint:

      >>> pprint.pformat(10000, underscore_numbers=True)
      '10_000'
      >>> pprint.pprint(10000, underscore_numbers=True)
      10000
    5. ericvsmith commented on Oct 21, 2021

      @ericvsmith
      Member

      It's a bug in pprint.py. PR to follow shortly.

    6. ericvsmith commented on Oct 21, 2021

      @ericvsmith
      Member

      New changeset 087f089 by Eric V. Smith in branch 'main':
      bpo-45557: Fix underscore_numbers in pprint.pprint(). (GH-29129)
      087f089

    7. miss-islington commented on Oct 21, 2021

      @miss-islington
      Contributor

      New changeset 6b75ad5 by Miss Islington (bot) in branch '3.10':
      bpo-45557: Fix underscore_numbers in pprint.pprint(). (GH-29129)
      6b75ad5

    8. 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 fixes

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions