Skip to content

gh-146492: Improve SyntaxError for missing comma between import clauses#146493

Open
brianschubert wants to merge 2 commits intopython:mainfrom
brianschubert:gh-146492-import-missing-comma
Open

gh-146492: Improve SyntaxError for missing comma between import clauses#146493
brianschubert wants to merge 2 commits intopython:mainfrom
brianschubert:gh-146492-import-missing-comma

Conversation

@brianschubert
Copy link
Copy Markdown
Contributor

@brianschubert brianschubert commented Mar 26, 2026

Demo:

>>> import a as a  b
  File "<python-input-0>", line 1
    import a as a  b
                ^^^^
SyntaxError: expected comma between import clauses

>>> from x import a as a  b
  File "<python-input-1>", line 1
    from x import a as a  b
                       ^^^^
SyntaxError: expected comma between import clauses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant