8000 bpo-38872: Document exec symbol for codeop.compile_command by nanjekyejoannah · Pull Request #20047 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-38872: Document exec symbol for codeop.compile_command #20047

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

Merged
merged 2 commits into from
May 15, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove extra statements
  • Loading branch information
nanjekyejoannah committed May 14, 2020
commit f5df35620f0575e1f1dedc4d4a9c12ca6448bd08
2 changes: 1 addition & 1 deletion Doc/library/code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ build applications which provide an interactive interpreter prompt.

*source* is the source string; *filename* is the optional filename from which
source was read, defaulting to ``'<input>'``; and *symbol* is the optional
grammar start symbol, which should be either ``'single'`` (the default), ``'eval'``
grammar start symbol, which should be ``'single'`` (the default), ``'eval'``
or ``'exec'``.

Returns a code object (the same as ``compile(source, filename, symbol)``) if the
Expand Down
4 changes: 1 addition & 3 deletions Doc/library/codeop.rst
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ To do just the former:
The *symbol* argument determines whether *source* is compiled as a statement
(``'single'``, the default), as a sequence of statements (``'exec'``) or
as an :term:`expression` (``'eval'``). Any other value will
cause :exc:`ValueError` to be raised. If *symbol* is ``'single'`` and *source*
is an expression, executing the resulting code object will print a representation
of the object the expression evaluates to unless it evaluates to ``None``.
cause :exc:`ValueError` to be raised.

.. note::

Expand Down
0