gh-131912: Use different grouping options for the integral and fractional parts#132170
gh-131912: Use different grouping options for the integral and fractional parts#132170picnixz merged 2 commits intopython:mainfrom
Conversation
Looks as a sphinx bug. @picnixz ? |
|
This one shouldn't be backported as 3.13 and below do not have grouping for fractional part. |
That would be a Pygment issue in this case. Sphinx delegates highlighting to pygments. |
|
Ah, indeed. Thanks. The problem might be reported, see pygments/pygments#1340. Though, maybe it's a slightly different one. @Prometheus3375 would you like to investigate it and report to upstream? |
|
Looks to me as the same. I will provide an additional context in that issue. |
|
It might be different just because |
|
They were introduced quite a while ago, in 3.6. Nethertheless, it is not the only place where highlighting does not occur. The same happens in a couple examples below like date format and nested formatting. |

A small addition to #132030 discussed in #132123. There are many examples with
_used as digit group separator, but only one with,. I changed last two examples with floating-point number to include a comma separator. I believe it is sufficient to show that both options can be used for both integral and fractional parts, as well as the fact that a user can mix them.📚 Documentation preview 📚