[issue3439] create a numbits() method for int and long types
STINNER Victor
report at bugs.python.org
Tue Oct 14 17:13:41 CEST 2008
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
> Accidentally removed the following message from Victor Stinner
No problem.
> Is there any good reason to make this a property?
Since numbits() cost is O(n) with n: number of digits. I prefer a
method than a property because, IMHO, reading a property should be
O(1) (*read* an attribute is different than *compute* a value).
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3439>
_______________________________________
More information about the Python-bugs-list
mailing list