]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
IDLE: replace if statement with expression (GH-94228)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 24 Jun 2022 17:30:55 +0000 (10:30 -0700)
committerGitHub <noreply@github.com>
Fri, 24 Jun 2022 17:30:55 +0000 (10:30 -0700)
(cherry picked from commit 91f9947f231cce2c72a3fb7b5c8e8cf49cc2c10f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Lib/idlelib/iomenu.py

index 86ce68c06a44704b54ccf7229940ec2fd60bbfba..327e885203c3ca75a045178587390fa65bfa6a2d 100644 (file)
@@ -13,14 +13,10 @@ from idlelib.config import idleConf
 from idlelib.util import py_extensions
 
 py_extensions = ' '.join("*"+ext for ext in py_extensions)
-
 encoding = 'utf-8'
-if sys.platform == 'win32':
-    errors = 'surrogatepass'
-else:
-    errors = 'surrogateescape'
+errors = 'surrogatepass' if sys.platform == 'win32' else 'surrogateescape'
+
 
-    
 class IOBinding:
 # One instance per editor Window so methods know which to save, close.
 # Open returns focus to self.editwin if aborted.