Comment on PEP-0238

"Jürgen A. Erhard" juergen.erhard at gmx.net
Sun Jul 8 15:13:27 EDT 2001


>>>>> "Guido" == Guido van Rossum <guido at python.org> writes:

    Guido> Andrew Kuchling <akuchlin at mems-exchange.org> writes:

    >> >   from __future__ import float_division
    >> >   from __future__ import real_division
    >> >   from __future__ import new_division
    >> >   from __future__ import division

    >> 'float_division'.  There's no type corresponding to "real", nor
    >> is that terminology used anywhere in the docs; 'new_division'
    >> and 'division' strike me as unclear.

I don't see new_division being particularly unclear... note that it
only appears in a __future__ statement, which already marks it a
"Uh-oh, we gotta watch out here!".  Agree on the "real" and pure
"division" thing, though.

    Guido> I would pick float_division in a jiffy if it weren't for
    Guido> the issue that some folks feel that they would rather have
    Guido> 1/3 return a rational number.  I think they'll lose that
    Guido> argument in the end, but I don't want to preclude that
    Guido> outcome just yet.  I like the proposal unified_division
    Guido> best so far, with float_division a close second.

I'm against float_division.

If Python *ever* grows a rational type (is that likely?  I thought it
was), 1/2 would certainly be the most obvious way to write a rational
literal (or: 1/2 producing a float instead of a rational would not be
as weird as its current behavior... but it would certainly be quite
non-obvious)

Bye, J

PS: Whether 0.1 should be a rational or a decimal float is something
else entirely (I'm not opposed to it returning a rational, but a
decimal float makes quite a bit more sense).

-- 
 Jürgen A. Erhard  (juergen.erhard at gmx.net, jae at users.sourceforge.net)
          My WebHome: http://members.tripod.com/Juergen_Erhard
                     I'm a FIG (http://www.fig.org)
             I wish I had more energy -- or less ambition.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 248 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20010708/531215ce/attachment.sig>


More information about the Python-list mailing list