A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-November/083543.html below:

[Python-Dev] n.numbits: method or property?

[Python-Dev] n.numbits: method or property?Aahz aahz at pythoncraft.com
Wed Nov 12 17:10:46 CET 2008
On Wed, Nov 12, 2008, Mark Dickinson wrote:
> On Wed, Nov 12, 2008 at 3:15 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>> 
>> As for numbits, I think it should be a method, because while it's
>> very fast for the current implementation of longs, it could be longer
>> to calculate for a long implementation using something other than a
>> power-of-2 base.
>
> Right: numbits is only a natural property of a *binary* integer.
>
> On the other hand, I can't realistically see Python ever adopting a
> non power-of-two based implementation.

What do you call Decimal?  ;-)
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4