-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-121610: pyrepl - handle extending blocks when multi-statement blocks are pasted #121757
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
Conversation
console.compile with the "single" param throws an exception when there are multiple statements, never allowing to adding newlines to a pasted code block (pythongh-121610) This add a few extra checks to allow extending when in an indented block, and tests for a few examples
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
…t blocks are pasted (pythonGH-121757) console.compile with the "single" param throws an exception when there are multiple statements, never allowing to adding newlines to a pasted code block (pythongh-121610) This add a few extra checks to allow extending when in an indented block, and tests for a few examples (cherry picked from commit 7d111da) Co-authored-by: saucoide <32314353+saucoide@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
GH-121825 is a backport of this pull request to the 3.13 branch. |
…nt blocks are pasted (GH-121757) (GH-121825) console.compile with the "single" param throws an exception when there are multiple statements, never allowing to adding newlines to a pasted code block (gh-121610) This adds a few extra checks to allow extending when in an indented block, and tests for a few examples. (cherry picked from commit 7d111da) Co-authored-by: saucoide <32314353+saucoide@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
…t blocks are pasted (pythonGH-121757) console.compile with the "single" param throws an exception when there are multiple statements, never allowing to adding newlines to a pasted code block (pythongh-121610) This add a few extra checks to allow extending when in an indented block, and tests for a few examples Co-authored-by: Łukasz Langa <lukasz@langa.pl>
console.compile with the "single" param throws an exception when there are multiple statements, never allowing to add newlines to a pasted code block (gh-121610)
This adds a few extra checks to allow extending when in an indented block, and tests for a few examples
I moved the function out of the outer one to be able to test it more easily, the tests check for what i think is the "expected" behavior for when to add a newline vs executing but please check me on that :)