From 12c03aa38479bb2d850f82c0eab28f42b35fcaae Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Fri, 24 Jun 2022 12:14:11 -0400 Subject: [PATCH] IDLE: replace if statement with expression --- Lib/idlelib/iomenu.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Lib/idlelib/iomenu.py b/Lib/idlelib/iomenu.py index 86ce68c06a4470..327e885203c3ca 100644 --- a/Lib/idlelib/iomenu.py +++ b/Lib/idlelib/iomenu.py @@ -13,14 +13,10 @@ 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.