[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Wishful request for next version: '// 1' should produce integer
- From: Francisco Olarte <folarte@...>
- Date: Fri, 7 Jan 2022 15:52:21 +0100
Hi:
On Fri, 7 Jan 2022 at 10:55, Flyer31 Test <flyer31@googlemail.com> wrote:
> The possibility of 2.5//0.1 is really a surprise to me - sorry, I did
> not think about this application yet.
I would normally never do it that way, I tendo to shuffle to integer
and use floor / ceil a lot for serious stuff, for quick and dirty
binning I've used it.
> if this produces the same as 25//1 then of course it will be a bit
> difficult to change such behaviour in future versions I must admit ...
> this really might be useful for some people (as you wrote it for your
> example).
It does not:
> print(25//1, 2.5//0.1)
25 25.0
But in my uses cases the first one would normally be 25.0/1.0
Francisco Olarte.