◐ Shell
clean mode source ↗

gh-87771: Improve documentation of eval() by slateny · Pull Request #100003 · python/cpython

Conversation

slateny

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

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.

slateny

iritkatriel

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

@netlify

@ncoghlan

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.

Labels