Author vstinner
Recipients PedanticHacker, gvanrossum, rhettinger, serhiy.storchaka, vstinner
Date 2021-02-18.15:00:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I'm not convinced that this operation is so common that it deserves a new operator. As Serhiy wrote, it must be first on python-ideas first. I close the issue.


floor division is x//y

integer ceil division can be implemented with math.ceil(x/y) for small numbers.

For large integer numbers, I like to use something like:

def ceil_div(x, y):
    rem=x % y
    if rem:
        x += y - rem
    return x//y

I let you adjust it for negative numbers ;-)
Date User Action Args
2021-02-18 15:00:41vstinnersetrecipients: + vstinner, gvanrossum, rhettinger, serhiy.storchaka, PedanticHacker
2021-02-18 15:00:41vstinnersetmessageid: <>
2021-02-18 15:00:41vstinnerlinkissue43255 messages
2021-02-18 15:00:41vstinnercreate