class documentation

class _AnnotationStringParser(ast.NodeTransformer): (source)

View In Hierarchy

Implementation of unstring_annotation().

When given an expression, the node returned by ast.NodeVisitor.visit() will also be an expression. If any string literal contained in the original expression is either invalid Python or not a singular expression, SyntaxError is raised.

Method visit_Constant Undocumented
Method visit_Str Undocumented
Method visit_Subscript Undocumented
Method _parse_string Undocumented
def visit_Constant(self, node): (source)

Undocumented

Parameters
node:ast.ConstantUndocumented
Returns
ast.exprUndocumented
def visit_Str(self, node): (source)

Undocumented

Parameters
node:ast.StrUndocumented
Returns
ast.exprUndocumented
def visit_Subscript(self, node): (source)

Undocumented

Parameters
node:ast.SubscriptUndocumented
Returns
ast.SubscriptUndocumented
def _parse_string(self, value): (source)

Undocumented

Parameters
value:strUndocumented
Returns
ast.exprUndocumented