From 8e90255349be4552da44e1960cc701d6c4c4ec88 Mon Sep 17 00:00:00 2001 From: david-sarah Date: Thu, 5 Aug 2010 21:16:16 -0700 Subject: [PATCH] test_util.py: remove use of 'a if p else b' syntax that requires Python 2.5. --- src/allmydata/test/test_util.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/allmydata/test/test_util.py b/src/allmydata/test/test_util.py index 0b7b24f2..6b687808 100644 --- a/src/allmydata/test/test_util.py +++ b/src/allmydata/test/test_util.py @@ -2035,9 +2035,7 @@ class StringSpans(unittest.TestCase): return ds def dump(s): p = set(s._dump()) - # wow, this is the first time I've ever wanted ?: in python - # note: this requires python2.5 - d = "".join([(S[i] if i in p else " ") for i in range(l)]) + d = "".join([((i not in p) and " " or S[i]) for i in range(l)]) assert len(d) == l return d DEBUG = False -- 2.45.2