[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-05 Thread Sander Bollen
Sander Bollen added the comment: Thanks for looking into this so swiftly! As a user, I have found PEP515 to be worded a little ambiguously with regards to formatting using underscores as thousands separators. While it enumerates a collection of types as far as the constructor is concerned

[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-04 Thread Sander Bollen
New submission from Sander Bollen : Hello, It appears that Decimal does not support PEP-515 style formatting with underscores as thousands separators. ``` >>> from decimal import Decimal >>> f"{Decimal('5000'):,}" '5,000' >>> f"