3 ms·
To be fair, Python's `/` creates floats, and this article is about a second operator `//`.
by lalaithion 3y ago
To be fair, Python's `/` creates floats, and this article is about a second operator `//`.
- taeric 3y agoContinuing in fairness, lisp is a bit more involved, here. If you do `(/ 1.0 3)`, you do not get a rational. Similarly, any division that is not integer/rational there will get treated mostly as expected. Basically, it seems as soon as you introduce a floating point number, it stays there. Which is roughly what I would expect.
- im3w1l 3y agoIn python 2, '/' creates integers, and the article was written in 2010 when python 2 was the most used by far.
- lalaithion 3y agofrom the link: > PS. Note that I am using // instead of / -- this is Python 3 syntax
- im3w1l 3y agoOh. Right.