Comment on PEP-0238
Roman Suzi
rnd at onego.ru
Sat Jul 7 15:41:06 EDT 2001
On Sat, 7 Jul 2001, Tim Peters wrote:
> idiv(5.0, 3.0)
Yes, I was going to propose this too.
>returned 1 too; i.e., that idiv(i, j) mathematically return floor(i/j).
>
>Alternative: Given the point about dumbdbm above, the missing half is a
>builtin to return (mathematically) ceiling(i/j) too. A very direct approach
>to both is to forget div/idiv and introduce two-argument builtins
>
> floor(i, j) # return floor of mathematical quotient
> ceiling(i, j) # return ceiling of mathematical quotient
Maybe make it floor2(i, j) and ceil2(i, j) ?
(like atan2)
(And put math into builtins ;-)
Sincerely yours, Roman Suzi
--
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Saturday, July 07, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "OK, I'm weird! But I'm saving up to become eccentric." _/
More information about the Python-list
mailing list