]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
More Pythonic check for qfont character range :)
authorDavid Mazary <dmazary@gmail.com>
Sun, 5 Feb 2012 17:02:31 +0000 (12:02 -0500)
committerDavid Mazary <dmazary@gmail.com>
Sun, 5 Feb 2012 17:02:31 +0000 (12:02 -0500)
I did not know it has such nice syntax!

xonstat/util.py

index 08a173146690ee1326a6484d8aebef4cb15ce413..758b2066d7497d0b5c2feb43ac307c2973aa9e77 100755 (executable)
@@ -65,7 +65,7 @@ def qfont_decode(qstr=''):
         qstr = ''
     chars = []
     for c in qstr:
-        if c >= u'\ue000' and c <= u'\ue0ff':
+        if u'\ue000' <= c <= u'\ue0ff':
             c = _qfont_table[ord(c) - 0xe000]
         chars.append(c)
     return ''.join(chars)