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

Exception when using quotes inside bracketed f-string #2474

Closed
scauligi opened this issue Jul 28, 2023 · 0 comments · Fixed by #2479
Closed

Exception when using quotes inside bracketed f-string #2474

scauligi opened this issue Jul 28, 2023 · 0 comments · Fixed by #2479
Labels

Comments

@scauligi
Copy link
Member

=> #[f["{0}"]f]
Traceback (most recent call last):
  File "stdin-75e2587a4a8f7962cbde4e5df3ca4c83fa031704", line 1
    #[f["{0}"]f]
         ^
hy.reader.exceptions.LexException: unterminated string literal (detected at line 1) (<string>, line 1)

Seems like an edge case in the reader, since #[f["a{0}"a]f] works fine, but removing either of the as (or swapping either a with its neighboring ") brings up the error again

@scauligi scauligi added the bug label Jul 28, 2023
scauligi pushed a commit to scauligi/hy that referenced this issue Jul 29, 2023
scauligi pushed a commit to scauligi/hy that referenced this issue Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant