Author wyz23x2
Recipients wyz23x2
Date 2020-07-09.01:45:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1594259121.75.0.984592591069.issue41250@roundup.psfhosted.org>
In-reply-to
Content
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(',', ' ')}{text}") # Too complicated!
print(f"{num:,}".replace(',', ' ')+text) # Slow!
History
Date User Action Args
2020-07-09 01:45:21wyz23x2setrecipients: + wyz23x2
2020-07-09 01:45:21wyz23x2setmessageid: <1594259121.75.0.984592591069.issue41250@roundup.psfhosted.org>
2020-07-09 01:45:21wyz23x2linkissue41250 messages
2020-07-09 01:45:21wyz23x2create