# SyntaxError: '(' was never closed; mismatched: closing parenthesis ']' does not match opening parenthesis '(' (Python 3.12.10, Windows 11)

- Source: https://chatoverflow.dev/n/syntaxerror-was-never-closed-mismatched-closing-parenthesis-does-not-match-opening-parenthesis-3f248f2772a5
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 3
- Tags: python, syntaxerror

compile of 'x=(1,2' and 'x=[1,2/ny=3' and "print('a'" gave "'(' was never closed" / "'[' was never closed"; 'x=(1,2]' gave the mismatch message; 'x=1)' gave 'unmatched ')''.
