From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 24 Jun 2022 17:30:55 +0000 (-0700) Subject: IDLE: replace if statement with expression (GH-94228) X-Git-Tag: v3.10.6~126 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=14943829a8dfacdf5fc1ef78bb155c0e2ec874a4;p=thirdparty%2FPython%2Fcpython.git IDLE: replace if statement with expression (GH-94228) (cherry picked from commit 91f9947f231cce2c72a3fb7b5c8e8cf49cc2c10f) Co-authored-by: Terry Jan Reedy --- 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.