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 steven.daprano
Recipients Nathaniel Manista, Vladimir Feinberg, mark.dickinson, serhiy.storchaka, steven.daprano, tim.peters
Date 2022-02-08.01:19:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20220208011850.GT16660@ando.pearwood.info>
In-reply-to <1644260500.76.0.502443775554.issue46639@roundup.psfhosted.org>
Content
Decimal is a good question.

Why does floor division not do floor division on Decimal? The 
documentation says

    The integer division operator // behaves analogously, returning the 
    integer part of the true quotient (truncating towards zero) rather 
    than its floor, so as to preserve the usual identity 
    x == (x // y) * y + x % y

but it's not clear why that identity is more important than floor 
division returning the floor.

I guess we could just document the difference and maybe add a 
Decimal ceildiv method, although that makes me sad :-(

Could we "fix" Decimal?
History
Date User Action Args
2022-02-08 01:19:29steven.dapranosetrecipients: + steven.daprano, tim.peters, mark.dickinson, serhiy.storchaka, Nathaniel Manista, Vladimir Feinberg
2022-02-08 01:19:29steven.dapranolinkissue46639 messages
2022-02-08 01:19:29steven.dapranocreate