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 mamrhein
Recipients eric.smith, facundobatista, mamrhein, mark.dickinson, rhettinger, skrah
Date 2019-12-17.21:22:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576617765.93.0.117727945326.issue39077@roundup.psfhosted.org>
In-reply-to
Content
Mark, to answer your question regarding the two implementations of Decimals:
No, in the cases I stated above there are no differences in their behaviour.

In order to dig a bit deeper, I wrote a little test:

d = cdec.Decimal("1234567890.1234")
p = pydec.Decimal("1234567890.1234")
for fill in ('', ' ', '_'):
    for align in ('', '<', '>', '^', '='):
        for sign in ('', '-', '+', ' '):
            for zeropad in ('', '0'):
                for min_width in ('', '25'):
                    for thousands_sep in ('', ','):
                        for precision in ('', '.3', '.5'):
                            for ftype in ('', 'e', 'f', 'g'): 
                                fmt = f"{fill}{align}{sign}{zeropad}{min_width}{thousands_sep}{precision}{ftype}"
                                try:
                                    df = format(d, fmt)
                                except ValueError:
                                    df = "<ValueError>"
                                try:
                                    pf = format(p, fmt)
                                except ValueError:
                                    pf = "<ValueError>"
                                if df != pf:
                                    print(fmt, df, pf)

It did not reveal any differences. The two implementations are equivalent regarding the tested combinations.
History
Date User Action Args
2019-12-17 21:22:45mamrheinsetrecipients: + mamrhein, rhettinger, facundobatista, mark.dickinson, eric.smith, skrah
2019-12-17 21:22:45mamrheinsetmessageid: <1576617765.93.0.117727945326.issue39077@roundup.psfhosted.org>
2019-12-17 21:22:45mamrheinlinkissue39077 messages
2019-12-17 21:22:45mamrheincreate