Skip to content

gh-87771: Improve documentation of eval() #100003

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

Closed
wants to merge 5 commits into from
Closed

Conversation

slateny
Copy link
Contributor

@slateny slateny commented Dec 5, 2022

Clone of the eval section of #25039 with conflicts fixed and some changes in phrasing, but wording kept mostly the same.

See this for discussion on 'condition list' and why it was changed to 'expression input'.

https://docs.python.org/dev/library/functions.html#eval

Co-authored-by: Cong Ma cong.ma@obspm.fr

environment where :func:`eval` is called. If only the *globals* argument is
provided, the local namespace defaults to *globals*.

Before evaluation, the special key ``"__builtins__"`` is searched for in the
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not too certain about quoting the key, and perhaps it could be non-literal and just "builtins" instead, but I'll defer judgement here.

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@netlify
Copy link

netlify bot commented Dec 8, 2022

Deploy Preview for python-cpython-preview ready!

Name Link
🔨 Latest commit 3c90d9c
🔍 Latest deploy log https://app.netlify.com/sites/python-cpython-preview/deploys/6391921a69b80b0009bfd4a1
😎 Deploy Preview https://deploy-preview-100003--python-cpython-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ncoghlan
Copy link
Contributor

This has been superseded by #119235 and its follow-ups (the exec/eval docs have also been more generally updated for PEP 667, hence the conflicts on this PR)

Thanks for the efforts here, even though they ultimately weren't merged.

@ncoghlan ncoghlan closed this Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants