On Sun, Nov 22, 2020 at 1:55 PM Samuel Colvin <samcol...@gmail.com> wrote:

> More generally, I think runtime type checking was never the intention for
> type hints, in fact I think Guido specifically said somewhere that runtime
> type checking was not an intended use case (am I right?). However
> pydantic and a few other projects seem to me to have been very successful
> in using them for that anyway. I'd love it if python's developers could be
> a bit more supportive to runtime type inspection in future.
>

I've always held that it must be *possible* to introspect annotations at
runtime, and I believe that we occasionally had to tweak static typing
features to support this. But that's not the same as supporting
isinstance() where the second argument is a generic type or some other
special form like Any or Callable[.....].

That said, if you have a specific wish, please start a new thread on
typing-sig and we'll discuss it.

-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/GJ6CGR5I5KTAKDPKT5KIUMFJOV2PC3JL/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to