Skip to content
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

Document PEP 585, 563, 604 and more. #9763

Merged
merged 9 commits into from
Jan 6, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix nits
  • Loading branch information
hauntsaninja committed Dec 11, 2020
commit c0c14b45e105a5169896c4b32cbafeaea074b500
6 changes: 3 additions & 3 deletions docs/source/runtime_troubles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Using classes that are generic in stubs but not at runtime
Some classes are declared as :ref:`generic<generic-classes>` in stubs, but not
at runtime.

In Python 3.8 and lower, there are several examples within the standard library,
In Python 3.8 and earlier, there are several examples within the standard library,
for instance, :py:class:`os.PathLike` and :py:class:`queue.Queue`. Subscripting
such a class will result in a runtime error:

Expand Down Expand Up @@ -268,7 +268,7 @@ Using generic builtins
Starting with Python 3.9 (:pep:`585`), the type objects of many collections in
the standard library support subscription at runtime. This means that you no
longer have to import the equivalents from :py:mod:`typing`; you can simply use
the built-in collections or those from :py:mod:`collections.abc`
the built-in collections or those from :py:mod:`collections.abc`:

.. code-block:: python

Expand Down Expand Up @@ -305,7 +305,7 @@ module in earlier versions of Python than the addition, for example, using any
of ``Literal``, ``Protocol``, ``TypedDict`` with Python 3.6.

The easiest way to do this is to install and use the ``typing_extensions``
package for the relevant imports, for example:
package from PyPI for the relevant imports, for example:

.. code-block:: python

Expand Down