[Python-Dev] Integer division operator can give float result?

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Feb 28 04:34:58 CET 2007


Is this intentional? I would have expected the
// operator to always give an integer result.

Python 2.3 (#1, Aug  5 2003, 15:52:30)
[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> 7.0 // 2
3.0

--
Greg


More information about the Python-Dev mailing list