This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author const
Recipients const
Date 2022-03-02.23:39:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646264392.01.0.522229307506.issue46904@roundup.psfhosted.org>
In-reply-to
Content
Decimal as implemented in _pydecimal supports the '#' alternate form in format strings, though this does not appear to be documented: as with floats, it causes a decimal point to be included regardless of value.  Decimal as implemented in cdecimal, as it uses libmpdec, does not.

This is a rather minor discrepancy; I hadn't actually intended to have # in my format string at all, but it had ended up there and was causing errors for half of the users of my library.  # also could be useful for decimals, as it can be for floats.

Like #45739, it's unclear to me whether this is a discrepancy that should be corrected by implementing # for cdecimal, removing # support for _pydecimal, or just documenting the inconsistency.
History
Date User Action Args
2022-03-02 23:39:52constsetrecipients: + const
2022-03-02 23:39:52constsetmessageid: <1646264392.01.0.522229307506.issue46904@roundup.psfhosted.org>
2022-03-02 23:39:51constlinkissue46904 messages
2022-03-02 23:39:51constcreate