Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev
Integer division operator can give float result?
 

Index | Next | Previous | View Flat


greg.ewing at canterbury

Feb 27, 2007, 7:34 PM


Views: 311
Permalink
Integer division operator can give float result?

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
_______________________________________________
Python-Dev mailing list
Python-Dev[at]python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Subject User Time
Integer division operator can give float result? greg.ewing at canterbury Feb 27, 2007, 7:34 PM
    Re: Integer division operator can give float result? fdrake at acm Feb 27, 2007, 8:30 PM
    Re: Integer division operator can give float result? facundo at taniquetil Feb 28, 2007, 4:22 AM
        Re: Integer division operator can give float result? guido at python Feb 28, 2007, 1:44 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.