diff -r 07cfe9f5561b -r 5e75f8a49e20 Doc/library/functions.rst --- a/Doc/library/functions.rst Fri Dec 06 12:57:40 2013 -0800 +++ b/Doc/library/functions.rst Sat Dec 07 02:14:45 2013 +0200 @@ -193,9 +193,9 @@ .. 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 string, an AST + or a bytes 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 (``''`` is diff -r 07cfe9f5561b -r 5e75f8a49e20 Python/bltinmodule.c --- a/Python/bltinmodule.c Fri Dec 06 12:57:40 2013 -0800 +++ b/Python/bltinmodule.c Sat Dec 07 02:14:45 2013 +0200 @@ -695,7 +695,8 @@ PyDoc_STRVAR(compile_doc, "compile(source, filename, mode[, flags[, dont_inherit]]) -> code object\n\ \n\ -Compile the source string (a Python module, statement or expression)\n\ +Compile 'source', which can be a string (a Python module,\n\ +statement or expression), an AST or a bytes object,\n\ into a code object that can be executed by exec() or eval().\n\ The filename will be used for run-time error messages.\n\ The mode must be 'exec' to compile a module, 'single' to compile a\n\