diff -r c5fbacf79b1e Doc/library/functions.rst --- a/Doc/library/functions.rst Sat Jan 30 12:34:12 2016 +0200 +++ b/Doc/library/functions.rst Sun Feb 21 16:46:51 2016 +0100 @@ -230,7 +230,7 @@ or ``2`` (docstrings are removed too). This function raises :exc:`SyntaxError` if the compiled source is invalid, - and :exc:`TypeError` if the source contains null bytes. + and :exc:`ValueError` if the source contains null bytes. If you want to parse Python code into its AST representation, see :func:`ast.parse`.