Skip to content
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

F1/F2/F3 behavior in the new repl #121584

Open
saucoide opened this issue Jul 10, 2024 · 2 comments
Open

F1/F2/F3 behavior in the new repl #121584

saucoide opened this issue Jul 10, 2024 · 2 comments
Labels
topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error

Comments

@saucoide
Copy link
Contributor

saucoide commented Jul 10, 2024

Bug report

Bug description:

Not sure if to split this into different issues may be better but anyhow

Trying out the new repl in 3.13.0b3, some of these maybe are not bugs but the
behavior feels weird:

When using the F1/F2/F3 keys there are these different behaviors:

F3 - pressing it twice toggles between paste/prompt
F2 - Pressing it twice does nothing, q exits, but ignores whatever was already in
the prompt, and adds a new one without a newline, shifting the prompt rightwards:

F2 + q multipe times:

➜ python
Python 3.13.0b3 (main, Jun 27 2024, 13:06:51) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> >>> >>> >>> >>> >>> >>> >>> 

F2 + q after having something there already

Python 3.13.0b3 (main, Jun 27 2024, 13:06:51) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> def foo():
...     i = 0
...     for n in range(10):>>> 

F1 - pressing it twice opens a nested help menu, if you do it a few times because you
think it didnt work, you have to q-q-q-quit

Trying on pypy's repl it doesnt seem possible to trigger help() from within help but
in the 3.13's repl its bound to F1 and keeps working :)

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs

@saucoide saucoide added the type-bug An unexpected behavior, bug, or error label Jul 10, 2024
@Eclips4 Eclips4 added the topic-repl Related to the interactive shell label Jul 10, 2024
@Octopus136
Copy link

I've noticed this as well at 3.14.0a0.

Also, when typing the help command directly and then q, >>> appears twice.

help> q

You are now leaving help and returning to the Python interpreter.
If you want to ask for help on a particular object directly from the
interpreter, you can type "help(object)".  Executing "help('string')"
has the same effect as typing a particular string at the help> prompt.
>>> >>>

@saucoide
Copy link
Contributor Author

i think something like this works for the help / F1 at least, and would toggle it on/off instead, not sure if the signal way of stopping the help is the best way but seems to work

saucoide@3ede941

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants