STINNER Victor <vstin...@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 <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

Reply via email to