Comment on PEP-0238
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Mon Jul 9 14:42:39 EDT 2001
Mon, 09 Jul 2001 18:19:10 GMT, Terry Reedy <tjreedy at home.com> pisze:
> I thought the desire was/is to have an operator which just preserved int /
> int -> int. But I have never seen it specified whether float div whatever
> would be an error or have the current meaning (in which case confirmation
> would not be necessary).
I would prefer it to mean integer division of fractional numbers, e.g.
1.3 div 0.3 == 4
1.3 mod 0.3 == 0.1
The question whether div should return int or long (or even fractional
with integral value) becomes irrelevant when ints and longs are unified
(even if "unified" means that operations on ints return longs instead
of raising overflow, keeping types distinct).
__("< Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
^^ SYGNATURA ZASTĘPCZA
More information about the Python-list