This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients evan_, flying sheep, gvanrossum, levkivskyi
Date 2017-01-15.22:50:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
Maybe a proposal should be discussed as an addendum to PEP 484? Or would
Mark Shannon reject that?

On Sun, Jan 15, 2017 at 2:48 PM, Ivan Levkivskyi <>

> Ivan Levkivskyi added the comment:
> > Maybe we need to take a step back and look at the needs for code that
> wants to implement runtime type checking more in general?
> I would say that the most convenient way for me would be a set of
> "inspect-style" simple helpers like ``is_union``, ``is_generic``,
> ``get_parameters`` (similar to inspect.ismethod, inspect.getargspec etc).
> > ISTM we have ways to access the parameters of a parameterized type
> (typically t.__parameters__) but we don't have a reasonable way yet to
> determine what kind of thing t is.
> There is one way that I see right now: using _gorg. For example,
> ``_gorg(Tuple[int, str]) is Tuple``, ``_gorg(Callable[..., str]) is
> Callable``, etc. This will also work for ``Union`` if we relax the assert
> that requires type to be instance of GenericMeta (now there is a common
> internal API used by almost everything in typing).
> ----------
> _______________________________________
> Python tracker <>
> <>
> _______________________________________
Date User Action Args
2017-01-15 22:50:57gvanrossumsetrecipients: + gvanrossum, flying sheep, levkivskyi, evan_
2017-01-15 22:50:57gvanrossumlinkissue29262 messages
2017-01-15 22:50:56gvanrossumcreate