Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: ram@zedat.fu-berlin.de (Stefan Ram) Newsgroups: comp.lang.python Subject: Re: ( n & -n ).bit_length() - 1 ## Really? Date: 19 Sep 2026 20:39:58 GMT Organization: Stefan Ram Lines: 10 Expires: 1 Sep 2027 11:59:58 GMT Message-ID: References: <118mo9b$2i0j0$1@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de vIu/mfHYDeBSXsId9fVArQG03uqO3IZNQwtlHwibYwNt3J Cancel-Lock: sha1:NmQfDXjYstiAQwMdU3QhkMH1JFk= sha256:/jDJYOFcdR9ZY7xTKykomrJl7cT7VdJcNWm0CxqIWtM= X-Copyright: (C) Copyright 2026 Stefan Ram. All rights reserved. Distribution through any means other than regular usenet channels is forbidden. It is forbidden to publish this article in the Web, to change URIs of this article into links, and to transfer the body without this notice, but quotations of parts in other Usenet posts are allowed. X-No-Archive: Yes Archive: no X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some services to mirror the article in the web. But the article may be kept on a Usenet archive server with only NNTP access. X-No-Html: yes Content-Language: en Xref: csiph.com comp.lang.python:198026 "Johann \"Myrkraverk\" Oskarsson" wrote or quoted: > it really should be simpler to just >count the zero bits in the underlying C code. > >Why can't we do that? You /can/ ask your chatbot to generate a C extension that does this and explain how to compile and call it from Python.