Conversation
docs/source/more_types.rst
Outdated
| If you want to use coroutines in Python 3.4, which does not support | ||
| the ``async def`` syntax, you can instead use the :py:func:`@asyncio.coroutine <asyncio.coroutine>` | ||
| decorator to convert a generator into a coroutine. | ||
| If you use coroutines in code that was written for Python 3.4, which |
Member
There was a problem hiding this comment.
Should we just drop this? 3.4 is long dead
Collaborator
Author
There was a problem hiding this comment.
I guess there may still legacy code that was originally written to support Python 3.4 and was never migrated to the new syntax, but this is pretty marginal. At least we could make this section shorter.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
| [tool.mypy] | ||
| exclude = [ | ||
| "^one\.py$", # TOML's double-quoted strings require escaping backslashes | ||
| "^one\\.py$", # TOML's double-quoted strings require escaping backslashes |
Member
There was a problem hiding this comment.
Should the next line change too? Haven't tested this myself
Collaborator
Author
There was a problem hiding this comment.
The comment indicates that single-quoted strings are different. I'll test his.
Collaborator
Author
There was a problem hiding this comment.
Yeah, single quotes behave differently, so the current example seems correct.
Member
There was a problem hiding this comment.
Thanks! Sorry for missing the comment.
JelleZijlstra
approved these changes
Mar 10, 2022
JukkaL
added a commit
that referenced
this pull request
Mar 10, 2022
* Some minor documentation updates * Add more discussion of exhaustiveness checking * Update docs/source/literal_types.rst * Simplify docs for legacy async Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.