]> 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)
committerJosé Matos <jamatos@lyx.org>
Mon, 3 Jun 2019 16:15:09 +0000 (17:15 +0100)
commita8937b53ecb054e140036b742e0c529bf8c9937a
treea4c95cf03d862cdbaa926b0bfec6b3751f5ef420
parentbab2316092cb2e3301e85790b446c7e2af6d05b8
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