mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 21:19:35 +00:00
961 B
961 B
Migration to version 0.20
Python 3 transition
Python 2 is deprecated since January 1st, 2020. The Clover platform moves to Python 3.
For running flight script instead of python command:
python flight.py
use python3 command:
python3 flight.py
Python 3 has certain syntax differences in comparison with the old version. Instead of print operator:
print 'Clover is the best' # this won't work
use print function:
print('Clover is the best')
The division operator operates floating points by default (instead of integer). Python 2:
>>> 10 / 4
2
Python 3:
>>> 10 / 4
2.5
For strings unicode type is used by default (instead of str type).
Encoding specification (# coding: utf8) is not necessary any more.
More details on all the language changes see in appropriate article.