how to get the thighest bit position in big integers?

Terry Reedy tjreedy at udel.edu
Wed Oct 29 23:59:37 CET 2008


Mensanator wrote:

> You would think when you add a new function, you would
> also add it's documentation, but maybe that was an
> oversight. I don't have 3.0, but maybe it can be found
> in that set of docs.
3.0c1
 >>> help(bin)
Help on built-in function bin in module builtins:

bin(...)
     bin(number) -> string

     Return the binary representation of an integer or long integer.

Manual
bin(x)
Convert an integer number to a binary string. The result is a valid 
Python expression. If x is not a Python int object, it has to define an 
__index__() method that returns an integer.

You can file a doc bug for whatever is missing in 2.6.  You might check 
other 3.0 builtins that were backported.

tjr




More information about the Python-list mailing list