STINNER Victor <vstin...@python.org> added the comment:
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 ;-) ---------- nosy: +vstinner resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43255> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com