Skip to content

Improve docs on type narrowing #18767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 8, 2025
Merged

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