I closed my proposal to add reveal_locals() given the underwhelming response here.

But one action item is to document reveal_locals() better in the type checkers that support it:
- It's documented for mypy at https://mypy.readthedocs.io/en/stable/common_issues.html#displaying-the-type-of-an-expression. It's a bit hidden though, so we should consider making it easier to find.
- I added support to pyanalyze and documented it at https://pyanalyze.readthedocs.io/en/latest/reference/extensions.html#pyanalyze.extensions.reveal_locals
- Pyright already supported it but with no documentation; I opened a PR to document it at https://github.com/microsoft/pyright/pull/2996 (and Eric merged it while I was writing this email, thanks!)



El mié, 2 feb 2022 a las 8:41, Guido van Rossum (<guido@python.org>) escribió:
Honestly I think it was added to mypy by an eager contributor who had a spike use case. It sounds like nobody really cares, so let's drop it.

On Wed, Feb 2, 2022 at 12:33 AM Mehdi2277 <med2277@gmail.com> wrote:
I'm unsure where it's documented currently. I only learned about reveal_locals from this thread. So I think primary value of adding it would be documentation. I think it's doomed to rare usage if it's documented no where. It would be nice if typing page mades references to other docs/included advice for useful typing features even if they may not be defined within typing.py. The mypy docs are main docs I learned basic type usage and I think it's very buried in them/unsure what page it lives in.

I think given rare usage, adding documentation and skipping runtime equivalent would be my vote. If years from now it becomes more commonly used, it can be reconsidered for runtime inclusion.
_______________________________________________
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: guido@python.org


--
--Guido van Rossum (python.org/~guido)
_______________________________________________
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: jelle.zijlstra@gmail.com