[issue43255] Ceil division with /// operator
STINNER Victor
report at bugs.python.org
Thu Feb 18 14:08:47 EST 2021
STINNER Victor <vstinner at python.org> added the comment:
> Anyway, my need for ceiling is that I am coding a chess GUI where I have a table with 2 columns and I create a new row whenever White makes a move. So, my implementation for row creation is math.ceil(len(moves) // 2) where moves is a list of chess moves.
You may like the new int.bit_count() attribute of Python 3.10 ;-)
https://docs.python.org/dev/library/stdtypes.html#int.bit_count
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43255>
_______________________________________
More information about the Python-bugs-list
mailing list