]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-29882: Add an efficient popcount method for integers (#771)
authorNiklas Fiekas <niklas.fiekas@backscattering.de>
Fri, 29 May 2020 16:28:02 +0000 (18:28 +0200)
committerGitHub <noreply@github.com>
Fri, 29 May 2020 16:28:02 +0000 (17:28 +0100)
commit8bd216dfede9cb2d5bedb67f20a30c99844dbfb8
tree0cae604e76e929467bba3cb1ebbec3ac8a417947
parent364b5ead1584583db91ef7f9d9f87f01bfbb5774
bpo-29882: Add an efficient popcount method for integers (#771)

* bpo-29882: Add an efficient popcount method for integers

* Update 'sign bit' and versionadded in docs

* Add entry to whatsnew document

* Doc: use positive example, mention population count

* Minor cleanups of the core code

* Move popcount_digit closer to where it's used

* Use z instead of self after conversion

* Add 'absolute value' and 'population count' to docstring

* Fix clinic error about missing summary line

* Ensure popcount_digit is portable with 64-bit ints

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Doc/library/stdtypes.rst
Doc/whatsnew/3.10.rst
Lib/test/test_doctest.py
Lib/test/test_long.py
Misc/NEWS.d/next/Core and Builtins/2019-06-02-11-29-15.bpo-29882.AkRzjb.rst [new file with mode: 0644]
Objects/clinic/longobject.c.h
Objects/longobject.c