[BUG] Claude incorrectly claims except A, B: is a SyntaxError in Python

Resolved 💬 1 comment Opened May 16, 2026 by Ir0nRaven Closed Jun 14, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude continually suggests that the following format is wrong:

except ExceptionA, ExceptionB:
doSomething()

This is valid Python 3 syntax.

What Should Happen?

Claude should not suggest this fix

Error Messages/Logs

Steps to Reproduce

  1. Create a python file with these lines:

try:
4/0
except ZeroDivisionError, Exception:
print("Can't div by 0")

  1. Ask claude to comment on file, it will say the two exceptions need parenthesis around them

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.141 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗