bpo-41887: omit leading spaces/tabs on ast.literal_eval (#22469)
Also document that eval() does this (the same way).
diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst
index 755c60f..62138ef 100644
--- a/Doc/library/ast.rst
+++ b/Doc/library/ast.rst
@@ -1586,6 +1586,9 @@
.. versionchanged:: 3.9
Now supports creating empty sets with ``'set()'``.
+ .. versionchanged:: 3.10
+ For string inputs, leading spaces and tabs are now stripped.
+
.. function:: get_docstring(node, clean=True)
@@ -1820,4 +1823,4 @@
`Parso <https://parso.readthedocs.io>`_ is a Python parser that supports
error recovery and round-trip parsing for different Python versions (in
multiple Python versions). Parso is also able to list multiple syntax errors
- in your python file.
\ No newline at end of file
+ in your python file.