[Qgis-developer] Unicode type QGIS_RELEASE_NAME and QGIS_VERSION
Minoru Akagi
akaginch at gmail.com
Tue Jul 12 01:44:56 PDT 2016
Hi,
2016-07-12 16:59 GMT+09:00 Akbar Gumbira <akbargumbira at gmail.com>:
> 2016-07-12 16:35 GMT+09:00 Matthias Kuhn <matthias at opengis.ch>:
>> As a general rule of thumb: don't cast to other types if there is no
>> requirement, that will help to prevent such issues and make the upcoming
>> upgrade to python 3 much easier.
>
> Yes, this should be Python 2.xx's developer haiku: Bytes on the outside,
> unicode on the inside. Encode/decode at the edges.
Unicode type release name (str type in python 3) must be compatible
with the saying.
Fixing the error would be easy for the relevant python devs. But if
the change was introduced in 3.0 (`type(QGis.QGIS_RELEASE_NAME)` gives
me `<type 'str'>` in QGIS 2.14. Not sure that it was technically
possible to keep str type for the constants), QGIS 2.16 users didn't
have to wait for the relevant plugin devs to release a modified
version.
Thanks,
Minoru
More information about the Qgis-developer
mailing list