Skip to content

Commit 1494382

Browse files
IDLE: replace if statement with expression (GH-94228)
(cherry picked from commit 91f9947) Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent 64892c5 commit 1494382

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Lib/idlelib/iomenu.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,10 @@
1313
from idlelib.util import py_extensions
1414

1515
py_extensions = ' '.join("*"+ext for ext in py_extensions)
16-
1716
encoding = 'utf-8'
18-
if sys.platform == 'win32':
19-
errors = 'surrogatepass'
20-
else:
21-
errors = 'surrogateescape'
17+
errors = 'surrogatepass' if sys.platform == 'win32' else 'surrogateescape'
18+
2219

23-
2420
class IOBinding:
2521
# One instance per editor Window so methods know which to save, close.
2622
# Open returns focus to self.editwin if aborted.

0 commit comments

Comments
 (0)