python-ast 1.0.2

A library for compiling Python to Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
import ast
#from io import StringIO

# Read the parse tree
def dump(s, indent=None, depth=0):
    if type(s) == list:
        l = []
        for i in s:
            l.append(dump(i, indent, depth=depth+1))
        return '[' + ', '.join(l) + ']'
    return ast.dump(s, indent=indent)