[issue33420] __origin__ invariant broken

2018-05-03 Thread Adam Paszke
Adam Paszke added the comment: Of course, I'm not expecting this to be 100% reliable, and so I'm ok with the answer that the comment is now outdated. I'd like to avoid adding extra dependencies for so simple things, so I guess I'll just special case that in my code for no

[issue33420] __origin__ invariant broken

2018-05-03 Thread Adam Paszke
New submission from Adam Paszke : Hi everyone, I have a module that needs to inspect type annotations on a few functions. One of the types I need to special case on is typing.Tuple, and I used code like this to detect it: if getattr(annotation, '__origin__', None) == ty