Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Add docs for Str.kind #57

Merged
merged 3 commits into from
Sep 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions typed_ast/ast27.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions typed_ast/ast3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down