Skip to content

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

Closed
slateny wants to merge 5 commits into
python:mainfrom
slateny:s/87772
Closed

gh-87771: Improve documentation of eval()#100003
slateny wants to merge 5 commits into
python:mainfrom
slateny:s/87772

Conversation

@slateny

@slatenyslateny commented Dec 5, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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.

Comment threadDoc/library/functions.rst
Comment threadDoc/library/functions.rst Outdated
Comment threadDoc/library/functions.rst
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@netlify

netlifyBot commented Dec 8, 2022

Copy link
Copy Markdown

Deploy Preview for python-cpython-preview ready!

NameLink
🔨 Latest commit3c90d9c
🔍 Latest deploy loghttps://app.netlify.com/sites/python-cpython-preview/deploys/6391921a69b80b0009bfd4a1
😎 Deploy Previewhttps://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
Copy Markdown
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.

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

Labels

awaiting reviewdocsDocumentation in the Doc dirskip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@slateny@ncoghlan@iritkatriel@bedevere-bot@JelleZijlstra