We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a03f12 commit 3ee1b32Copy full SHA for 3ee1b32
1 file changed
docs/development.rst
@@ -444,12 +444,12 @@ include extra code to make sure it works in all the supported versions.
444
445
Some examples which show how to handle those cases are described below.
446
447
-Context Managers
+Type annotation for unions
448
~~~~~~~~~~~~~~~~
449
450
-Context managers aren't available in Python 2.5 by default. If you want to use
451
-them make sure to put from ``__future__ import with_statement`` on top of the
452
-file where you use them.
+In Python 3.9 and below, the pipe character (``|``) cannot be used for union
+types in type annotations. Instead, you should use ``Union`` from the ``typing``
+module:
453
454
Utility functions for cross-version compatibility
455
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments