cpython icon indicating copy to clipboard operation
cpython copied to clipboard

"Paste mode" in the new REPL does not display the result of evaluated expressions

Open AlexWaygood opened this issue 1 year ago • 1 comments

We've discovered that if you manually type out a condition that evaluates to False in the new REPL, False is printed as the result, as expected...

>>> (3, 13, 0, "final") < (3, 13, 0, "beta")
False

...but that if you copy and paste this condition into the REPL, nothing is printed (implying that the condition evaluates to None:

>>> (3, 13, 0, "final") < (3, 13, 0, "beta")
>>> 

Thanks @Eclips4 for realising that the difference in behaviour here was due to copying-and-pasting the condition rather than typing it out!

Originally posted by @AlexWaygood in https://github.com/python/cpython/issues/111201#issuecomment-2102541362

AlexWaygood avatar May 10 '24 11:05 AlexWaygood

It is not only with conditions, but with any expressions, including literals.

serhiy-storchaka avatar May 10 '24 12:05 serhiy-storchaka

Looks like this is now fixed! (@pablogsal or @ambv please reopen if there's more to do!)

AlexWaygood avatar May 23 '24 14:05 AlexWaygood