← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol/openlp/python3-true-division into lp:openlp

 

The proposal to merge lp:~googol/openlp/python3-true-division into lp:openlp has been updated.

Description changed to:

Hello,

- use python3 division

There might still be places where we use the old division. Somebody did some refactoring to the slidecontroller so I left the changes there.

http://ci.openlp.org/view/Specific%20Branch/job/OpenLP-Pull_and_Run_Interface_Tests/33/
http://ci.openlp.org/view/Specific%20Branch/job/OpenLP-Pull_and_Run_Functional_Tests/93/

How future division works: Use number // number if you want an integer (like number / number in python2). Number / number gives you a float (like float(number) / float(number in python2).

[andreas@andylaptop python3-true-division]$ python2
Python 2.7.5 (default, May 12 2013, 12:00:47) 
[GCC 4.8.0 20130502 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 1 / 2
0
>>> float(1) / float(2)
0.5
>>> from __future__ import division
>>> 1 / 2
0.5
>>> 1 // 2
0
>>> 

For more details, see:
https://code.launchpad.net/~googol/openlp/python3-true-division/+merge/164575
-- 
https://code.launchpad.net/~googol/openlp/python3-true-division/+merge/164575
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/python3-true-division into lp:openlp.


References