diff --git a/typed_ast/ast27.py b/typed_ast/ast27.py index 4ba86673..fd5c4ea7 100644 --- a/typed_ast/ast27.py +++ b/typed_ast/ast27.py @@ -19,9 +19,8 @@ called with `mode=func_type`. - `Module` has a `type_ignores` field which contains a list of lines which have been `# type: ignore`d. - - `Str` has a `has_b` boolean field which indicates if the string is - explicitly prefixed with a `b`. (This is deprecated and may be removed in - future versions.) + - `Str` has a `kind` string field which preserves the original string + prefix, so that `ast27.parse('br"test"').body[0].value.kind == 'br'`. An abstract syntax tree can be generated by using the `parse()` function from this module. The result will be a tree of objects whose diff --git a/typed_ast/ast3.py b/typed_ast/ast3.py index e44632cd..ba3c0216 100644 --- a/typed_ast/ast3.py +++ b/typed_ast/ast3.py @@ -21,6 +21,8 @@ newer Python syntax features. - `Module` has a `type_ignores` field which contains a list of lines which have been `# type: ignore`d. + - `Str` has a `kind` string field which preserves the original string + prefix, so that `ast3.parse('u"test"').body[0].value.kind == 'u'`. An abstract syntax tree can be generated by using the `parse()` function from this module. The result will be a tree of objects whose