summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-12-07 01:12:39 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-12-07 01:12:39 (GMT)
commit933142a8f238529c610edf2100c4208a8ee82805 (patch)
tree4590e4c17911495abe8778ae73a477f1cf9c3706 /Doc
parentd4d60554bcd93e7a6a1d5eb29e11be945f161a80 (diff)
downloadcpython-933142a8f238529c610edf2100c4208a8ee82805.zip
cpython-933142a8f238529c610edf2100c4208a8ee82805.tar.gz
cpython-933142a8f238529c610edf2100c4208a8ee82805.tar.bz2
document that compile() can take bytes (closes #19910)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/functions.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index b125a78..ae29cd8 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -193,9 +193,9 @@ are always available. They are listed here in alphabetical order.
.. function:: compile(source, filename, mode, flags=0, dont_inherit=False, optimize=-1)
Compile the *source* into a code or AST object. Code objects can be executed
- by :func:`exec` or :func:`eval`. *source* can either be a string or an AST
- object. Refer to the :mod:`ast` module documentation for information on how
- to work with AST objects.
+ by :func:`exec` or :func:`eval`. *source* can either be a normal string, a
+ byte string, or an AST object. Refer to the :mod:`ast` module documentation
+ for information on how to work with AST objects.
The *filename* argument should give the file from which the code was read;
pass some recognizable value if it wasn't read from a file (``'<string>'`` is