"Ninereeds" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
| On Mar 17, 7:26 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
| > "Ninereeds" <[EMAIL PROTECTED]> wrote in message
| >
| > 
news:[EMAIL PROTECTED]
| > | Is the PEP238 change to division going into Python 3 as planned?
| >
| > IDLE 3.0a3>>> 1/2
| >
| > 0.5
| >
| > | I realise that the new integer division semantics have been available
| > | in "from __future__" for quite a few years now, but a warning might 
be
| > | appropriate now that Python 3 is in alpha.
| >
| > 2.6, I have read, have optional 'Py3' warnings, and a 2to3 conversion
| > program
|
| The tools can work out the *intent* of any particular division
| operator? Can work out whether the result should be integer or float,
| independent of any particular set of arguments? Seems unlikely.

For the case of int division, one should have started using 1//2 already 
for floor division.  Before running 2to3, a program should pass all tests 
with 'from __future__ import division', so that a/b definitely means 
fractions division even for int/int.  Then the only thing 2to3 has to do in 
this regard is delete the future import.



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to