[issue40176] unterminated string literal tokenization error messages could be better

2021-01-20 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.9 ___ Python tracker ___ __

[issue40176] unterminated string literal tokenization error messages could be better

2021-01-20 Thread miss-islington
miss-islington added the comment: New changeset a698d52c3975c80b45b139b2f08402ec514dce75 by Batuhan Taskaya in branch 'master': bpo-40176: Improve error messages for unclosed string literals (GH-19346) https://github.com/python/cpython/commit/a698d52c3975c80b45b139b2f08402ec514dce75 ---

[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: -19576 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 275d7e1080d0007a82965d1ac510abb0ae8d7821 by Pablo Galindo in branch '3.9': [3.9] bpo-40176: Improve error messages for trailing comma on from import (GH-20294) (GH-20302) https://github.com/python/cpython/commit/275d7e1080d0007a82965d1ac

[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +19576 pull_request: https://github.com/python/cpython/pull/20302 ___ Python tracker ___ ___

[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: -19573 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +19573 pull_request: https://github.com/python/cpython/pull/20302 ___ Python tracker ___ ___

[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 72e0aa2fd2b9c6da2caa5a9ef54f6495fc2890b0 by Batuhan Taskaya in branch 'master': bpo-40176: Improve error messages for trailing comma on from import (GH-20294) https://github.com/python/cpython/commit/72e0aa2fd2b9c6da2caa5a9ef54f6495fc2890

[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: -19569 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue40176] unterminated string literal tokenization error messages could be better

2020-05-21 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +19569 pull_request: https://github.com/python/cpython/pull/20294 ___ Python tracker ___ _

[issue40176] unterminated string literal tokenization error messages could be better

2020-04-13 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: Fair point. I changed error messages to what you suggested >>> (300) * 6 + ca(e, 2 +"dsadsa) File "", line 1 (300) * 6 + ca(e, 2 +"dsadsa) ^ SyntaxError: unterminated string literal >>> (300) * 6 + ca(e, 2 +'dsa

[issue40176] unterminated string literal tokenization error messages could be better

2020-04-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I afraid there may be confusion between triple, double and single quoted string literals. So I suggest to change error messages to just "unterminated triple-quoted string literal" and "unterminated string literal" (or "unterminated single-quoted string lit

[issue40176] unterminated string literal tokenization error messages could be better

2020-04-04 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: >>> message = "sadsa File "", line 1 message = "sadsa ^ SyntaxError: unterminated double quote -- ___ Python tracker ___

[issue40176] unterminated string literal tokenization error messages could be better

2020-04-03 Thread Ammar Askar
Ammar Askar added the comment: Just re-posting this here from the open PR. Rust's handling of this seems nice and beginner friendly: error: unterminated double quote string --> src/main.rs:2:19 | 2 | let message = "Hello world | ___^ 3 | | println!(

[issue40176] unterminated string literal tokenization error messages could be better

2020-04-03 Thread Alex Gaynor
Alex Gaynor added the comment: Here's my suggestion: End of line reached without finding the end of string literal. Are you missing a closing quote? -- nosy: +alex ___ Python tracker __

[issue40176] unterminated string literal tokenization error messages could be better

2020-04-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It could be even better. Inside the tokenizer we know where the string literal starts and what quotes it uses. The line and the offset of the *start* of the literal can be set in a SyntaxError. -- nosy: +serhiy.storchaka __

[issue40176] unterminated string literal tokenization error messages could be better

2020-04-03 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch nosy: +BTaskaya nosy_count: 1.0 -> 2.0 pull_requests: +18710 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19346 ___ Python tracker _

[issue40176] unterminated string literal tokenization error messages could be better

2020-04-03 Thread Benjamin Peterson
New submission from Benjamin Peterson : It has been pointed out to me that the errors the tokenizer produces for unterminated strings, "EOL while scanning string literal" and "EOF while scanning triple-quoted string literal", contain parsing jargon that make it difficult for new users to unde