bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60142: 28.1; python.el Incorrect region when python-shell-send-regio


From: Augusto Stoffel
Subject: bug#60142: 28.1; python.el Incorrect region when python-shell-send-region from indented code
Date: Mon, 19 Dec 2022 11:25:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

On Sun, 18 Dec 2022 at 12:39, Eli Zaretskii wrote:

>> If I select the `a` or `a = "test"` it will correctly send it to the
>> console, however it won't echo the evaluation of the statement.

I can at least explain why this happens and is expected.

An evaluation result is printed only if you send a bunch of statements,
the last of which is an expression.  OTOH, since whitespace is
significant in Python, if you evaluate anything that's not a "toplevel
form" it gets wrapper in a `if True:` statement, so the actually
evaluated code is not a simple expression anymore.

It seems hard to work around this limitation.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]