-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Crossreferences to standard library in mypy docs, part 6 #7697
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
Signed-off-by: Oleg Höfling <[email protected]>
docs/source/more_types.rst
Outdated
decorator to convert a generator into a coroutine. | ||
|
||
Note that we set the ``YieldType`` of the generator to be ``Any`` in the | ||
following example. This is because the exact yield type is an implementation | ||
detail of the coroutine runner (e.g. the ``asyncio`` event loop) and your | ||
detail of the coroutine runner (e.g. the :py:mod:`asyncio` :doc:`event loop <library/asyncio-eventloop>`) and your |
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 an additional link to the event loop doc here will be helpful..?
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 a single link is sufficient here. The asyncio event loop docs are not directly relevant here anyway.
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.
Agree, removed!
* :py:meth:`d.setdefault(key, default) <dict.setdefault>` | ||
* :py:meth:`d1.update(d2) <dict.update>` | ||
* :py:meth:`d.pop(key[, default]) <dict.pop>` (partial ``TypedDict``\s only) | ||
* ``del d[key]`` (partial ``TypedDict``\s only) |
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.
Please advise whether referencing dict
methods is useful here.
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.
Yeah, I think it is useful.
Signed-off-by: Oleg Höfling <[email protected]>
* :py:meth:`d.setdefault(key, default) <dict.setdefault>` | ||
* :py:meth:`d1.update(d2) <dict.update>` | ||
* :py:meth:`d.pop(key[, default]) <dict.pop>` (partial ``TypedDict``\s only) | ||
* ``del d[key]`` (partial ``TypedDict``\s only) |
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.
Yeah, I think it is useful.
Added references to the
more_types.rst
. This is the second-to-last part of splitting up the changes in #7624 into more readable PRs.