]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
IDLE: replace if statement with expression (#94228)
authorTerry Jan Reedy <tjreedy@udel.edu>
Fri, 24 Jun 2022 16:59:49 +0000 (12:59 -0400)
committerGitHub <noreply@github.com>
Fri, 24 Jun 2022 16:59:49 +0000 (12:59 -0400)
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.