GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-131885: Update location of positional-only parameter indicator for `eval` and `exec` in the documentation by gapplef · Pull Request #139978 · python/cpython

Conversation

@gapplef

@gapplef gapplef commented Oct 12, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Fix incorrect location of positional-only parameter indicator for eval and exec in the documentation


📚 Documentation preview 📚: https://cpython-previews--139978.org.readthedocs.build/

  • Issue: Update function signatures to use * and / as needed #131885

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gapplef
Update location of positional-only parameter indicator for eval and…
a92b87a
… `exec`

Fix incorrect location of positional-only parameter indicator for `eval` and `exec`
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels Oct 12, 2025
@python-cla-bot

python-cla-bot Bot commented Oct 12, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added the awaiting review label Oct 12, 2025
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Oct 12, 2025
@github-project-automation github-project-automation Bot added this to Docs PRs Oct 12, 2025
@StanFromIreland StanFromIreland changed the title Update location of positional-only parameter indicator for eval and exec in the documentation gh-131885: Update location of positional-only parameter indicator for eval and exec in the documentation Oct 12, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Oct 12, 2025
Update function signatures to use * and / as needed #131885
Open
4 of 5 tasks
StanFromIreland
StanFromIreland reviewed Oct 12, 2025
View reviewed changes

@StanFromIreland StanFromIreland left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong since 2770d5c (see versionchanged notes).

For example, globals can be passed as a positional argument:

>>> eval("x + 1", {'x': 1})
2

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@StanFromIreland StanFromIreland added the pending The issue will be closed if no feedback is provided label Oct 12, 2025
@StanFromIreland
StanFromIreland requested a review from JelleZijlstra October 12, 2025 07:39
@picnixz

picnixz commented Oct 12, 2025

Copy link
Copy Markdown
Member

Closing since the current implementation accepts keyword-arguments.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz picnixz closed this Oct 12, 2025
@gapplef

gapplef commented Oct 12, 2025

Copy link
Copy Markdown
Author

@picnixz May I ask which version you've tested?

>>> import sys
>>> sys.version
'3.12.11 | packaged by conda-forge | (main, Jun  4 2025, 14:45:31) [GCC 13.3.0]'

>>> eval( "x + 1", globals={'x': 1})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: eval() takes no keyword arguments

>>> exec( "x + 1", globals={'x': 1})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'globals' is an invalid keyword argument for exec()
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Oct 12, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Python 3.13 and later. We don't update 3.12 anymore (except for security fixes).

StanFromIreland and gapplef reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gapplef

gapplef commented Oct 12, 2025

Copy link
Copy Markdown
Author

OK, Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@StanFromIreland StanFromIreland StanFromIreland left review comments
@JelleZijlstra JelleZijlstra Awaiting requested review from JelleZijlstra

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review docs Documentation in the Doc dir pending The issue will be closed if no feedback is provided skip news

Projects

Docs PRs
Status: Todo

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@gapplef @picnixz @StanFromIreland
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.