astroid icon indicating copy to clipboard operation
astroid copied to clipboard

Our understanding of typing.NamedTuple is lossy

Open PCManticore opened this issue 8 years ago • 0 comments

It seems we can do a much better job over here:

  • our current transform is losing the type of the arguments

  • we should support typing.NamedTuple subclasses. I just added a basic support for it, but I don't feel it is enough, since we could store the types as well.

  • it also seems that NamedTuple can have default values for its attributes

https://docs.python.org/3/library/typing.html#typing.NamedTuple

PCManticore avatar Apr 14 '17 09:04 PCManticore