]> git.lyx.org Git - features.git/commit
Fix bug in python comparison.
authorJosé Matos <jamatos@lyx.org>
Mon, 3 Jun 2019 16:15:09 +0000 (17:15 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:32 +0000 (15:48 +0200)
commitd63d6b74361e7102538441b08da34d3e71dfac79
tree647330766c5425f718093eb576a165611bef874a
parent520a1569d5171686b3559eb510e5bbb4b50ce0f9
Fix bug in python comparison.

It worked in python2 but not the way the authors imagined. Because hex always returns a string.

From python2:
>>> 1 > "2"
False
>>> "2" > 1
True
>>> "1" > 2
True

The rational is that an integer is always smaller than a string.

In python 3 this because it does not make sense to compare objects of different types.
lib/scripts/convertDefault.py