[issue33420] __origin__ invariant broken

Ivan Levkivskyi report at bugs.python.org
Thu May 3 14:51:00 EDT 2018


Ivan Levkivskyi <levkivskyi at gmail.com> added the comment:

Yes, the comment needs to be updated, but as you said, no guaranties about undocumented dunder attribute. We tried to preserve as much of the API as possible in 3.7 after PEP 560, but something needs to be sacrificed (especially in the purely internal API you used).

You may instead use `typing_inspect` library on PyPI, I am not 100% sure it will help in your case, but it has `is_tuple_type` function that should work across several versions of `typing`.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33420>
_______________________________________


More information about the Python-bugs-list mailing list