bpo-47212: Improve error messages for un-parenthesized generator expressions (GH-32302)

This commit is contained in:
Matthieu Dartiailh 2022-04-05 15:47:13 +02:00 committed by GitHub
parent f1606a5ba5
commit aa0f056a00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 8 deletions

View file

@ -1307,6 +1307,13 @@ Specialized indentation errors:
Traceback (most recent call last):
IndentationError: expected an indented block after 'try' statement on line 1
>>> try:
... something()
... except:
... pass
Traceback (most recent call last):
IndentationError: expected an indented block after 'except' statement on line 3
>>> try:
... something()
... except A: