[issue41250] Number separators in different places

2020-07-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you for the suggestion, but we'll decline for the reasons listed in the PEP and those listed by Eric. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue41250] Number separators in different places

2020-07-08 Thread Eric V. Smith
Eric V. Smith added the comment: The formatting specification language is already complicated enough without adding even more to it. As PEP 378 says "It is not the goal to replace the locale module, to perform internationalization tasks, or accommodate every possible convention." Your best

[issue41250] Number separators in different places

2020-07-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: This was considered in PEP 378 โ€” Format Specifier for Thousands Separator.ยน The decision was to keep it simple and only support groups of three digits using a comma as the separator. FWIW, the decimal documentation has a formatting recipe that could be ad

[issue41250] Number separators in different places

2020-07-08 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue41250] Number separators in different places

2020-07-08 Thread wyz23x2
wyz23x2 added the comment: Q: Why not use f"{var:,}".replace(',', sepchar) for the sepchar parameter? A: It is very complicated in the case below: num = 1234567 text = 'Hello, world!' print(f"{num:,}{text}").replace(',', ' ') # Becomes '1 234 567Hello world!' print(f"{f'{num:,}'.replace(',', '

[issue41250] Number separators in different places

2020-07-08 Thread wyz23x2
New submission from wyz23x2 : The current syntax is this for thousand separators: f'{var:,}' It will return this when var is 1234567: '1,234,567' But sometimes we need a way to insert them in other places. For example: 123456789 โ†’ '1,2345,6789' (4) 62938757312 โ†’ '6,29387,57312' (5) This could be