Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Prev Previous commit
Next Next commit
Update documentation to describe None in ast.Interpolation
  • Loading branch information
George-Ogden committed Sep 29, 2025
commit 5ab2512ac6ded9de5ded0566af29d04a1d99add2
2 changes: 2 additions & 0 deletions Doc/library/ast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ Literals
function call).
This has the same meaning as ``FormattedValue.value``.
* ``str`` is a constant containing the text of the interpolation expression.

If ``str`` is set to ``None``, then ``value`` is used to generate code when calling :func:`ast.unparse`. This no longer guarantees that the generated code is identical to the original and is intended for code generation.
Comment thread
George-Ogden marked this conversation as resolved.
Outdated
* ``conversion`` is an integer:

* -1: no conversion
Expand Down
Loading