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

pprint -> underscore_numbers argument not working #89720

Closed
jpvincent1980 mannequin opened this issue Oct 21, 2021 · 5 comments
Closed

pprint -> underscore_numbers argument not working #89720

jpvincent1980 mannequin opened this issue Oct 21, 2021 · 5 comments
Labels
3.10 only security fixes 3.11 only security fixes

Comments

@jpvincent1980
Copy link
Mannequin

jpvincent1980 mannequin commented Oct 21, 2021

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']

    @jpvincent1980
    Copy link
    Mannequin Author

    jpvincent1980 mannequin commented Oct 21, 2021

    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

    @jpvincent1980 jpvincent1980 mannequin changed the title Issue 42914 pprint -> underscore_numbers argument not working Oct 21, 2021
    @jpvincent1980 jpvincent1980 mannequin changed the title Issue 42914 pprint -> underscore_numbers argument not working Oct 21, 2021
    @ericvsmith
    Copy link
    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

    @ericvsmith
    Copy link
    Member

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

    @ericvsmith
    Copy link
    Member

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

    @miss-islington
    Copy link
    Contributor

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

    @ericvsmith ericvsmith added 3.10 only security fixes 3.11 only security fixes labels Oct 21, 2021
    @ericvsmith ericvsmith added 3.10 only security fixes 3.11 only security fixes labels Oct 21, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes 3.11 only security fixes
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants