Skip to content

Commit b140e5a

Browse files
IDLE: replace if statement with expression (GH-94228)
(cherry picked from commit 91f9947) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
1 parent 251193e commit b140e5a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Lib/idlelib/iomenu.py

Lines changed: 2 additions & 6 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy