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

View file

@ -13,14 +13,10 @@ from idlelib.config import idleConf
from idlelib.util import py_extensions from idlelib.util import py_extensions
py_extensions = ' '.join("*"+ext for ext in py_extensions) py_extensions = ' '.join("*"+ext for ext in py_extensions)
encoding = 'utf-8' encoding = 'utf-8'
if sys.platform == 'win32': errors = 'surrogatepass' if sys.platform == 'win32' else 'surrogateescape'
errors = 'surrogatepass'
else:
errors = 'surrogateescape'
class IOBinding: class IOBinding:
# One instance per editor Window so methods know which to save, close. # One instance per editor Window so methods know which to save, close.
# Open returns focus to self.editwin if aborted. # Open returns focus to self.editwin if aborted.