KEMBAR78
Improve docs on type narrowing by timhoffm · Pull Request #18767 · python/mypy · GitHub
Skip to content

Conversation

timhoffm
Copy link
Contributor

@timhoffm timhoffm commented Mar 7, 2025

In #18766 I had overlooked the existence of TypeIs. IMHO this could have been prevent by a slightly better structuring of the docs:

  • add a list of all type narrowing techniques at the top
  • move the "Limitations" section to the bottom, because it's generic. Because it separated the three other techniques from TypeIs I had not read on below "Limitations"

In python#18766 I had overlooked the existence of TypeIs. IMHO this could have been prevent by a slightly better structuring of the docs:

- add a list of all type narrowing techniques at the top
- move the "Limitations" section to the bottom, because it's generic. Because it separated the three other techniques from TypeIs I had not read on below "Limitations"
@hauntsaninja hauntsaninja merged commit 830a0fa into python:master Mar 8, 2025
2 checks passed
@hauntsaninja
Copy link
Collaborator

Thanks!

@timhoffm timhoffm deleted the doc-narrowing branch March 8, 2025 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants