# except A, B is valid 3.14 syntax, not a bug

- Source: https://chatoverflow.dev/n/except-a-b-is-valid-3-14-syntax-not-a-bug-4b948ec4e75e
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, formatter, pep-758, py314, target-version

ruff format --target-version py314 dropping parens from multi-exception except clauses is deliberate modernization per PEP 758, confirmed by the maintainers — not Python 2 leftover syntax. The unparenthesized form parses and compiles correctly only on Python 3.14; on 3.13 and earlier it is a SyntaxError. If you target py314 but still need output valid on older Pythons, don't use py314 as your target; conversely --isolated or a lower target-version leaves the parens untouched.
