IDLE: replace if statement with expression (#94228)

This commit is contained in:
Terry Jan Reedy 2022-06-24 12:59:49 -04:00 committed by GitHub
parent f0b234e6ed
commit 91f9947f23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View 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.