From a72e2d68cca28c514182b8510c8abd7df57e88e5 Mon Sep 17 00:00:00 2001 From: dreamflow Date: Mon, 18 Dec 2023 17:14:15 +0100 Subject: [PATCH] gh-108113: [docs] mention PyCF_OPTIMIZED_AST in ast Compiler Flags (#113241) --- Doc/library/ast.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index 4ebbe0e5471c88c..9997edd0fb5fc0e 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -2457,6 +2457,13 @@ effects on the compilation of a program: Generates and returns an abstract syntax tree instead of returning a compiled code object. +.. data:: PyCF_OPTIMIZED_AST + + The returned AST is optimized according to the *optimize* argument + in :func:`compile` or :func:`ast.parse`. + + .. versionadded:: 3.13 + .. data:: PyCF_TYPE_COMMENTS Enables support for :pep:`484` and :pep:`526` style type comments