New repl shows output only for last statement from several, separated by ";"
Open
Nobody has claimed this yet.
3.13
3.14
stdlib
topic-repl
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
An example:
$ python3.13
Python 3.13.1 (tags/v3.13.1:0671451779, Dec 4 2024, 07:55:26) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 1;2
2
$ PYTHON_BASIC_REPL=1 python3.13
Python 3.13.1 (tags/v3.13.1:0671451779, Dec 4 2024, 07:55:26) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 1;2
1
2
That's valid for the current main.
A lot of docstrings in the mpmath rely on this feature of old repl. So, this looks as a bug for me.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
- gh-131341
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the standard CPython REPL with PYTHON_BASIC_REPL=1 using the semicolon-separated expression example shown in the report. Check the linked PR gh-131341 and confirm that the regular REPL prints the result of each statement while preserving existing behavior for other input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100