Python 3 and PEP238 division

Terry Reedy tjreedy at udel.edu
Tue Mar 18 22:11:37 EDT 2008


"Ninereeds" <stephenhorne100 at aol.com> wrote in message 
news:3b9c9176-101f-4c72-8a56-82d16aea48d5 at k13g2000hse.googlegroups.com...
| On Mar 17, 7:26 pm, "Terry Reedy" <tjre... at udel.edu> wrote:
| > "Ninereeds" <stephenhorne... at aol.com> wrote in message
| >
| > 
news:ddaa40d0-3d75-44b7-98ad-7dfaa3b3e6de at m44g2000hsc.googlegroups.com...
| > | 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.

where the conversion is not deterministic, the tool will either ask or 
point out the possible change or not.  I have not used it, and it is still 
being developed -- and tested in use by developers. 






More information about the Python-list mailing list