module documentation
Evaluate subtrees corresponding to python literals. This is a modified copy of typed_ast.ast3.literal_eval. The latter doesn't handle Name nodes, so it would not handle something like "{'type': A}". Our version converts that to "{'type': 'A'}" which is consistent with auto-stringifying type annotations. We also separate out string and node evaluation into separate functions.
Function | eval |
Undocumented |
Function | literal |
Modified version of ast3.literal_eval, handling things like typenames. |
Function | _convert |
Helper function for literal_eval. |
Constant | _NUM |
Undocumented |