A use for integer quotients

Terry Reedy tjreedy at home.com
Mon Jul 23 16:02:08 EDT 2001


"> - If anything, the new // operator ought to apply to new behavior,
not be
>   foisted upon existing code.  If people desparately want integer
division to
>   return floating point results, then the onus should be on them to
use a
>   new operator.

The PEP proposal is to separate the current mixed meaning of / into
two new, unmixed meanings, one assigned to / and the other to //.  The
alternative suggested above and by others is not merely to switch
meanings but to keep the mixed meaning while adding one and only one
unmixed meaning.  It does not break code but has other problems.






More information about the Python-list mailing list