Skip to content

Commit 7dfca04

Browse files
pushing changes
1 parent 335b187 commit 7dfca04

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

Doc/library/functions.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,9 @@ are always available. They are listed here in alphabetical order.
611611
untrusted user-supplied input will lead to security vulnerabilities.
612612

613613
The *source* argument is parsed and evaluated as a Python expression
614-
using the *globals* and *locals* mappings as global and local namespace.
615-
If the *globals* dictionary is present and does not contain a value for the
616-
key ``__builtins__``, a
614+
(technically speaking, an :ref:`expression list <exprlists>`) , using
615+
the *globals* and *locals* mappings as global and local namespace. If the *globals*
616+
dictionary is present and does not contain a value for the key ``__builtins__``, a
617617
reference to the dictionary of the built-in module :mod:`builtins` is
618618
inserted under that key before *source* is parsed.
619619
Overriding ``__builtins__`` can be used to restrict or change the available
@@ -633,6 +633,9 @@ are always available. They are listed here in alphabetical order.
633633
>>> eval('x+1')
634634
2
635635

636+
>>> eval("1, 2")
637+
(1,2)
638+
636639
This function can also be used to execute arbitrary code objects (such as
637640
those created by :func:`compile`). In this case, pass a code object instead
638641
of a string. If the code object has been compiled with ``'exec'`` as the
@@ -2380,4 +2383,4 @@ are always available. They are listed here in alphabetical order.
23802383

23812384
.. [#] Note that the parser only accepts the Unix-style end of line convention.
23822385
If you are reading the code from a file, make sure to use newline conversion
2383-
mode to convert Windows or Mac-style newlines.
2386+
mode to convert Windows or Mac-style newlines.

0 commit comments

Comments
 (0)