I (really, really) need division operator in Python3 behaves like in Python2.
Python2 code:
--> 11/5
2
--> 11.0/5
2.2
But in Python3 we have
--> 11//5
2
--> 11.0//5
2.0
I can change / to // or whatever, but I expect the same results. Any ideas?
/operator behave like the Python 2 one. If you want integer division is Python 3, you must use//. There is no way to get an operator in Python 3 that sometimes does integer division and sometimes does float division; the whole point of changing this in Python 3 was to cleanly separate those two operations. You would need to write your own function that checks the types and uses the operator you want.