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 — gh-142927: Tachyon: Comma separate thousands and fix singular/plurals by hugovk · Pull Request #142934 · python/cpython

Conversation

@hugovk

@hugovk hugovk commented Dec 18, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
Thing Before After
Console
Captured 4497 samples in 0.45 seconds
Sample rate: 10000.01 samples/sec
Error rate: 13.74%
Heatmap output written to heatmap_69830/
- Index: heatmap_69830/index.html
- 93 source file(s) analyzed
Captured 4,411 samples in 0.44 seconds
Sample rate: 10,000.01 samples/sec
Error rate: 20.40%
Heatmap output written to heatmap_70238/
- Index: heatmap_70238/index.html
- 92 source files analyzed
Index header image image
Index file list image image
Single file header image image
Single file specialisation image image

I used the UX improvement issue (#142927) for this, but can change it to the main implementation one (#138122) or another.

  • Issue: Improve Tachyon UX #142927

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hugovk
Comma separate thousands, fix plurals
49b0b0b
@hugovk
hugovk requested a review from pablogsal as a code owner December 18, 2025 13:15
@hugovk hugovk added the skip news label Dec 18, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Dec 18, 2025
Improve Tachyon UX #142927
Open
11 tasks done
@bedevere-app bedevere-app Bot added the awaiting core review label Dec 18, 2025
@picnixz

picnixz commented Dec 18, 2025

Copy link
Copy Markdown
Member

I'd like to suggest using a locale translation for separating numbers instead of using english-based values. I am personally always confused when commas are used to separate thousands and I think it's better if it's using a localized output.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland

StanFromIreland commented Dec 18, 2025

Copy link
Copy Markdown
Member

I disagree with the "Single file specialisation," IMO the plural sounds better and in general zero takes a plural noun form?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Dec 18, 2025

Copy link
Copy Markdown
Member Author

I'd like to suggest using a locale translation for separating numbers instead of using english-based values. I am personally always confused when commas are used to separate thousands and I think it's better if it's using a localized output.

Right now, the numbers are formatted in the Python script, and then put into the HTML. I guess one way would be to put unformatted numbers in the HTML and use some JS to do locale conversion in the browser?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Dec 18, 2025

Copy link
Copy Markdown
Member Author

I disagree with the "Single file specialisation," IMO the plural sounds better and in general zero takes a plural noun form?

"x/y" is like saying "x of y", and it's the "y" that matters for the plural:

  • "0 of 0 instructions"
  • "0 of 1 instruction"
  • "1 of 1 instruction"
  • "1 of 4 instructions"
  • "3 of 4 instructions"
picnixz reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Dec 19, 2025

Copy link
Copy Markdown
Member

Right now, the numbers are formatted in the Python script, and then put into the HTML. I guess one way would be to put unformatted numbers in the HTML and use some JS to do locale conversion in the browser?

Can't we use localized messages? or maybe pass through locale.(...) for formatting numbers?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
Format numbers with current locale
9cfd9ef
@hugovk

hugovk commented Dec 19, 2025

Copy link
Copy Markdown
Member Author

Yes, and that's much simpler :)

How does this 9cfd9ef look?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Dec 19, 2025

Copy link
Copy Markdown
Member

It looks better (and simpler). For the "words" we can also use gettext.ngettext to get a possible localized plural form (I don't know if you want all messages to be localized actually, but I think it may makes sense. argparse has localized output and profiling is something that is also very user-facing)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
Fix test___all__ failed (env changed): locale was modified by test___…
c774239
…all__
@hugovk

hugovk commented Dec 19, 2025

Copy link
Copy Markdown
Member Author

I'll let you open a followup if you'd like to localise the words :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
fixup! Format numbers with current locale
0a1c52e
pablogsal
pablogsal approved these changes Dec 20, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Dec 20, 2025
@pablogsal
pablogsal merged commit ff7f62e into python:main Dec 22, 2025
48 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Dec 22, 2025
@hugovk
hugovk deleted the 3.15-tachyon-formatting branch December 22, 2025 15:17
@hugovk hugovk mentioned this pull request Feb 27, 2026
gh-142927: Tachyon: Fix singular and plurals #145329
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pablogsal pablogsal pablogsal approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@hugovk @picnixz @StanFromIreland @pablogsal
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — 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.