Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brackets check doesn't account for arbitrary nested parentheses #80

Closed
chisholm opened this issue Sep 15, 2020 · 0 comments · Fixed by #81
Closed

Brackets check doesn't account for arbitrary nested parentheses #80

chisholm opened this issue Sep 15, 2020 · 0 comments · Fixed by #81

Comments

@chisholm
Copy link
Contributor

There is code to add a simpler error message in one particular case: when the user has forgotten square brackets around the pattern. But it is too specific: it requires that patterns start with either [ or ([:

if not (start[0] == '[' or start == '(['):

Patterns can have arbitrarily nested structure, so the pattern can start with an arbitrary number of open parentheses. The check needs to be generalized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant