[Python-checkins] cpython (3.2): use modern conditional syntax

benjamin.peterson python-checkins at python.org
Tue Sep 25 17:04:14 CEST 2012


http://hg.python.org/cpython/rev/48b738bc1045
changeset:   79169:48b738bc1045
branch:      3.2
parent:      79166:b738e42e664a
user:        Benjamin Peterson <benjamin at python.org>
date:        Tue Sep 25 11:01:41 2012 -0400
summary:
  use modern conditional syntax

files:
  Lib/test/test_import.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -575,7 +575,7 @@
         self.assertTrue(os.path.exists('__pycache__'))
         self.assertTrue(os.path.exists(os.path.join(
             '__pycache__', '{}.{}.py{}'.format(
-            TESTFN, self.tag, __debug__ and 'c' or 'o'))))
+            TESTFN, self.tag, 'c' if __debug__ else 'o'))))
 
     @unittest.skipUnless(os.name == 'posix',
                          "test meaningful only on posix systems")

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list