From: David Mazary Date: Sun, 5 Feb 2012 17:02:31 +0000 (-0500) Subject: More Pythonic check for qfont character range :) X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=65c8533e4bde9c5f7a5c4414993049ea4ff033fd;p=xonotic%2Fxonstat.git More Pythonic check for qfont character range :) I did not know it has such nice syntax! --- diff --git a/xonstat/util.py b/xonstat/util.py index 08a1731..758b206 100755 --- a/xonstat/util.py +++ b/xonstat/util.py @@ -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)