Skip to content

Incorrect function name in error message of _interpreters.run_string #132174

Description

@sobolevn

While working on #132173 I've noticed that this error message mentions the wrong function:

>>> import _interpreters
>>> _interpreters.create()
1
>>> _interpreters.run_string(1, '')
Traceback (most recent call last):
  File "<python-input-2>", line 1, in <module>
    _interpreters.run_string(1, '')
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
ValueError: _interpreters.exec(): bad script text (too short)

It should be:

>>> import _interpreters
>>> _interpreters.create()
1
>>> _interpreters.run_string(1, '')
Traceback (most recent call last):
  File "<python-input-4>", line 1, in <module>
    _interpreters.run_string(1, '')
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
ValueError: _interpreters.run_string(): bad script text (too short)

I have a PR ready.

Linked PRs

Activity

  1. self-assigned this
    on Apr 6, 2025
  2. added 2 commits that reference this issue on Apr 6, 2025
  3. added a commit that references this issue on Apr 7, 2025
  4. added a commit that references this issue on Apr 7, 2025
  5. added a commit that references this issue on Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions