Skip to content

Conversation

@Michael0x2a
Copy link
Contributor

We recently cut a new-ish release of typed-ast that adds a new field named kind to the ast27.Str and ast3.Str classes. This field stores whatever string modifiers (like b or u) were present on the original string.

As a note, I've confirmed that this field is indeed a str (and not bytes) for ast27's Str class.

We recently cut a new-ish release of typed-ast that [adds a new field][0]
named `kind` to the `ast27.Str` and `ast3.Str` classes. This field
stores whatever string modifiers (like `b` or `u`) were present on the
original string.

As a note, I've confirmed that this field is indeed a str (and not
bytes) for ast27's Str class.

  [0]: python/typed_ast#49

class Str(expr):
s = ... # type: str
kind = ... # type: str
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use PEP 526 style for updated stubs (up to you).

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that PEP 526-style annotations would be preferable.

@Michael0x2a
Copy link
Contributor Author

Sg -- I'll land this now and submit a separate PR later to switch over the annotations.

@Michael0x2a Michael0x2a merged commit 44e6b6e into python:master Dec 18, 2018
@Michael0x2a Michael0x2a deleted the add-typed-ast-str-kind branch December 18, 2018 18:37
Michael0x2a added a commit to Michael0x2a/mypy that referenced this pull request Dec 18, 2018
Syncs typeshed, mostly to pick up python/typeshed#2699
Michael0x2a added a commit to python/mypy that referenced this pull request Dec 18, 2018
Syncs typeshed, mostly to pick up python/typeshed#2699
yedpodtrzitko pushed a commit to yedpodtrzitko/typeshed that referenced this pull request Jan 23, 2019
We recently cut a new-ish release of typed-ast that [adds a new field][0]
named `kind` to the `ast27.Str` and `ast3.Str` classes. This field
stores whatever string modifiers (like `b` or `u`) were present on the
original string.

As a note, I've confirmed that this field is indeed a str (and not
bytes) for ast27's Str class.

  [0]: python/typed_ast#49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants