A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-February/071406.html below:

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

[Python-Dev] Integer division operator can give float result? [Python-Dev] Integer division operator can give float result?Fred L. Drake, Jr. fdrake at acm.org
Wed Feb 28 05:30:40 CET 2007
On Tuesday 27 February 2007 22:34, Greg Ewing wrote:
 > Is this intentional? I would have expected the
 > // operator to always give an integer result.

Think "floor division", not "integer division".  The result (r) may be a 
float, but it'll hold to the constraint:

    r == int(r)


  -Fred

-- 
Fred L. Drake, Jr.   <fdrake at acm.org>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4