-
Notifications
You must be signed in to change notification settings - Fork 263
Replace typing_extensions -> typing in examples #1987
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
Conversation
from typing_extensions import Never | ||
from typing import Never |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss on the issue for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, and sorry for the delay. I think your hybrid approach is the best of both worlds. A few remarks below.
@@ -54,7 +54,7 @@ As an example, consider this simple calculator: | |||
.. code:: python | |||
|
|||
import enum | |||
from typing_extensions import Never | |||
from typing import Never |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never needs an infobox as well. (Added in Python 3.11.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I didn't add it for that one because it's already explained in the prose at the start of the page; but I've added an additional infobox below the code snippet now for consistency (and perhaps easier discoverability for people who only skim the page) 👍
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
Fixes #1986.