[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-12-27 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 ___ Python tracker ___

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-12-27 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 576e38f9db61ca09ca6dc57ad13b02a7bf9d370a by Miss Islington (bot) in branch '3.10': bpo-42918: Improve built-in function compile() in mode 'single' (GH-29934) (GH-30040)

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-12-10 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +28266 pull_request: https://github.com/python/cpython/pull/30040 ___ Python tracker

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 28179aac796ed1debdce336c4b8ca18e8475d40d by Weipeng Hong in branch 'main': bpo-42918: Improve build-in function compile() in mode 'single' (GH-29934) https://github.com/python/cpython/commit/28179aac796ed1debdce336c4b8ca18e8475d40d --

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-12-05 Thread hongweipeng
Change by hongweipeng : -- keywords: +patch nosy: +hongweipeng nosy_count: 4.0 -> 5.0 pull_requests: +28158 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29934 ___ Python tracker

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-02-05 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: Thanks a lot for the report, Xinmeng! This is a bug in how we're checking for bad single statements in bad_single_statement and it's not trivial to fix due to the string shenanigans we're doing there in newline_in_string, which does not account for many

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-01-12 Thread Xinmeng Xia
Xinmeng Xia added the comment: For sure! As soon as we validate this technique, we will open source it on GitHub. -- ___ Python tracker ___

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: It’s good work! Is it open source? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-01-12 Thread Xinmeng Xia
Xinmeng Xia added the comment: The bytecode of c is as following: 0 LOAD_CONST 0 (1) 2 STORE_NAME 0 (d) 4 LOAD_CONST 1 (None) 6 RETURN_VALUE === Yes,

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: What does the bytecode for c in program 2 look like? Also, how do you find all these bugs? Are you developing a new fuzzier? -- nosy: +gvanrossum ___ Python tracker

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-01-12 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +lys.nikolaou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-01-12 Thread Xinmeng Xia
Change by Xinmeng Xia : -- components: +Interpreter Core ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-01-12 Thread Xinmeng Xia
New submission from Xinmeng Xia : For build-in function compile() in mode 'single', only single statement can be well compiled. If we compile multiple statements, the parser will raise a syntaxError. Seeing the following two programs, In program 1, 2 statement are compiled. So the parser