From: Terry Jan Reedy Date: Fri, 24 Jun 2022 16:59:49 +0000 (-0400) Subject: IDLE: replace if statement with expression (#94228) X-Git-Tag: v3.12.0a1~1130 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=91f9947f231cce2c72a3fb7b5c8e8cf49cc2c10f;p=thirdparty%2FPython%2Fcpython.git IDLE: replace if statement with expression (#94228) --- diff --git a/Lib/idlelib/iomenu.py b/Lib/idlelib/iomenu.py index 86ce68c06a44..327e885203c3 100644 --- a/Lib/idlelib/iomenu.py +++ b/Lib/idlelib/iomenu.py @@ -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.