diff options
author | Georg Brandl <georg@python.org> | 2008-08-30 10:03:09 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-08-30 10:03:09 +0000 |
commit | cdc24944d91064f8ac566bfc74f5a05b43714512 (patch) | |
tree | 73798cbefb6903444cc9292042b91a8c7607664f /Doc | |
parent | 8d09eff4589312cdca1fed146484eced61de5381 (diff) | |
download | cpython-cdc24944d91064f8ac566bfc74f5a05b43714512.tar.gz |
#3569: eval() also accepts "exec"able code objects.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/functions.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 9586a3492a..d463924f37 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -381,10 +381,10 @@ available. They are listed here in alphabetical order. >>> print eval('x+1') 2 - This function can also be used to execute arbitrary code objects (such as those - created by :func:`compile`). In this case pass a code object instead of a - string. The code object must have been compiled passing ``'eval'`` as the - *kind* argument. + This function can also be used to execute arbitrary code objects (such as + those created by :func:`compile`). In this case pass a code object instead + of a string. If the code object has been compiled with ``'exec'`` as the + *kind* argument, :func:`eval`\'s return value will be ``None``. Hints: dynamic execution of statements is supported by the :keyword:`exec` statement. Execution of statements from a file is supported by the |