8000 change old python example by Polandia94 · Pull Request #2059 · apache/libcloud · GitHub
[go: up one dir, main page]

Skip to content

change old python example #2059

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

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Changes from all commits
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
8 changes: 4 additions & 4 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -417,12 +417,12 @@ include extra code to make sure it works in all the supported versions.

Some examples which show how to handle those cases are described below.

Context Managers
Type annotation for unions
~~~~~~~~~~~~~~~~

Context managers aren't available in Python 2.5 by default. If you want to use
them make sure to put from ``__future__ import with_statement`` on top of the
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:

Utility functions for cross-version compatibility
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
0