[docs] Minor doc bug
Sandro Tosi
sandro.tosi at gmail.com
Sun Jul 31 23:20:17 CEST 2011
Hello Jay,
On Fri, Jul 22, 2011 at 02:17, Jay Dresser <jay at jaydresser.us> wrote:
> http://docs.python.org/py3k/whatsnew/3.2.html#optimizations
> "String to integer conversions now work two “digits” at a time, reducing
> the number of division and modulo operations."
> String to integer uses multiplication. Integer to string uses division and
> modulo.
> I'm not sure what you meant, but since division is more costly than
> multiplication, I suspect you meant
> "Integer to string conversions now work two “digits” at a time, reducing
> the number of division and modulo operations."
> (doing modulo 100 instead of modulo 10)
> I could be wrong since the fractional part of floating point numbers would
> use division (but not modulo) for string to integer.
Thanks for spotting it! They were indeed swapped: I've just filed
http://bugs.python.org/issue12668 to fix it.
Regards,
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
More information about the docs
mailing list