Skip to content
Snippets Groups Projects
Commit 70d5e5f5 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

[doc] add warning about limitations of to_python depending on the python version

parent fb27ea7d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -312,6 +312,14 @@ expect the number of spaces to add or to remove as first argument.
.to_python()
------------
 
.. WARNING::
Since RedBaron calls `literal_eval` it can only parse the python code parsed
by the python version you are using.
For example if you are using a python version inferior to 3.6, `to_python`
will crash on `100_000` because it is only supported since python 3.6
This method safely evaluate the current selected nodes. It wraps
`ast.literal_eval
<https://docs.python.org/2/library/ast.html#ast.literal_eval>`_, therefor, and
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment