how to get the thighest bit position in big integers?
greg
greg at cosc.canterbury.ac.nz
Wed Oct 8 20:21:47 EDT 2008
Terry Reedy wrote:
> str.find is an historical anomaly that should not be copied. It
> was(is?) a wrapper for C's string find function. C routinely uses -1 to
> mean None for functions statically typed to return ints. The Python
> version logically should return None and usually does for other functions.
Although Guido has defended it on the grounds that it can
be inconvenient having a function that returns different
types under different circumstances. Also it discourages
making the mistake of treating the return value as a
boolean.
--
Greg
More information about the Python-list
mailing list