Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8bd74d commit 07e0e06Copy full SHA for 07e0e06
2 files changed
Lib/idlelib/EditorWindow.py
@@ -1618,7 +1618,7 @@ def run(self):
1618
tokens = _tokenize.generate_tokens(self.readline)
1619
for token in tokens:
1620
self.tokeneater(*token)
1621
- except _tokenize.TokenError:
+ except (_tokenize.TokenError, SyntaxError):
1622
# since we cut off the tokenizer early, we can trigger
1623
# spurious errors
1624
pass
Misc/NEWS
@@ -182,6 +182,9 @@ Core and Builtins
182
Library
183
-------
184
185
+- Issue #16504: IDLE now catches SyntaxErrors raised by tokenizer. Patch by
186
+ Roger Serwy.
187
+
188
- Issue #16618: Make glob.glob match consistently across strings and bytes
189
regarding leading dots. Patch by Serhiy Storchaka.
190
0 commit comments