[issue43255] Ceil division with /// operator

Boštjan Mejak report at bugs.python.org
Thu Feb 18 15:41:28 EST 2021


Boštjan Mejak <bostjan.xperia at gmail.com> added the comment:

My hat off to you, Mr. Peters! Your suggestion (len(moves) + 1) // 2 works perfectly and is much more elegant than --0-- len(moves) // 2. :)

Mr. Stinner, in what way would int.bit_count() be beneficial to me?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43255>
_______________________________________


More information about the Python-bugs-list mailing list