Message407990
I'll share a draft PR soon (excluding Decimal), so far it's still looking straightforward.
> Maybe old versions would correctly ignore the new bit being set.
That's one of the benefits of using bit flags in an ABI: backward-compatible extensibility. (An implementation can defeat it by intentionally failing if unknown bits are encountered, but the code in question doesn't appear to be doing this.)
> You can round explicitly before formatting
>
> >>> '%5.1f' % (round(-.00001, 1) + 0.0)
Yes, I have experience with it.
1. even as a one-off, it's questionable. If someone accidentally changes the precision in only one of the spec string or round call, that's a bug.
2. since applications and libraries may pass around format specs, and because of (1), you'll try to make a programmatic solution. Now you're parsing format spec strings.
3. while a programmatic solution can be done for a function API like format() that takes a separate spec and value, there is no sane way to wrap f-strings |
|
Date |
User |
Action |
Args |
2021-12-08 01:51:59 | John Belmonte | set | recipients:
+ John Belmonte, mark.dickinson, eric.smith, steven.daprano, serhiy.storchaka |
2021-12-08 01:51:58 | John Belmonte | set | messageid: <1638928318.97.0.611568298172.issue45995@roundup.psfhosted.org> |
2021-12-08 01:51:58 | John Belmonte | link | issue45995 messages |
2021-12-08 01:51:58 | John Belmonte | create | |
|