← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #688770]: Division not working in Sikuli with Python

 

Question #688770 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688770

Manfred Hampl proposed the following answer:
The behavior of integer divisions has changed between python2 and
python3.

In python2 dividing an integer by an integer (5/2) results in an integer (=2) (fraction of result cut off).
In python3 dividing an integer by an integer (5/2) results in a float result (=2.5). There is now a//b giving an integer result.

Maybe this is the explanation of the difference.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.