
I know of at least one popular typing context wherein `reveal_type` isn't provided: PyCharm. I'm not sure exactly how that affects the argument for/against. On the one hand, if you're using PyCharm without another type checker, all the examples using reveal_type just don't make any sense unless you already know the PyCharm equivalent (lookup Quick Documentation for member). On the other hand, at first blush it seems a little odd to add something to the standard lib to make up for this situation. On the gripping hand, what else is going to fix this little problem with the communication about types? On Mon, Jan 17, 2022 at 11:35 AM Eric Traut <eric@traut.com> wrote:
I stand corrected. I thought these were both part of PEP 484, but you're correct that they were added later by mypy. As Jelle said, they are both well known and used pretty extensively in code samples within the typing world.
The benefit of having them implemented is to allow these samples to run in the interpreter.
If there's good reason not to add these two functions to `typing`, a reasonable fallback is to add them to `typing_extensions`. _______________________________________________ Typing-sig mailing list -- typing-sig@python.org To unsubscribe send an email to typing-sig-leave@python.org https://mail.python.org/mailman3/lists/typing-sig.python.org/ Member address: dustin.wyatt@gmail.com