|
1 | | -# Autogenerated by Sphinx on Tue Apr 7 16:13:12 2026 |
| 1 | +# Autogenerated by Sphinx on Sun May 10 13:21:26 2026 |
2 | 2 | # as part of the release process. |
3 | 3 |
|
4 | 4 | topics = { |
@@ -6594,8 +6594,9 @@ def whats_on_the_telly(penguin=None): |
6594 | 6594 |
|
6595 | 6595 | 1. find a module, loading and initializing it if necessary |
6596 | 6596 |
|
6597 | | -2. define a name or names in the local namespace for the scope where |
6598 | | - the "import" statement occurs. |
| 6597 | +2. define a name or names in the current namespace for the scope where |
| 6598 | + the "import" statement occurs, just as an assignment statement |
| 6599 | + would (including "global" and "nonlocal" semantics). |
6599 | 6600 |
|
6600 | 6601 | When the statement contains multiple clauses (separated by commas) the |
6601 | 6602 | two steps are carried out separately for each clause, just as though |
@@ -6640,7 +6641,7 @@ def whats_on_the_telly(penguin=None): |
6640 | 6641 |
|
6641 | 6642 | 3. if the attribute is not found, "ImportError" is raised. |
6642 | 6643 |
|
6643 | | - 4. otherwise, a reference to that value is stored in the local |
| 6644 | + 4. otherwise, a reference to that value is stored in the current |
6644 | 6645 | namespace, using the name in the "as" clause if it is present, |
6645 | 6646 | otherwise using the attribute name |
6646 | 6647 |
|
@@ -10739,8 +10740,18 @@ class is used in a class pattern with positional arguments, each |
10739 | 10740 | str.swapcase() |
10740 | 10741 |
|
10741 | 10742 | Return a copy of the string with uppercase characters converted to |
10742 | | - lowercase and vice versa. Note that it is not necessarily true that |
10743 | | - "s.swapcase().swapcase() == s". |
| 10743 | + lowercase and vice versa. For example: |
| 10744 | + |
| 10745 | + >>> 'Hello World'.swapcase() |
| 10746 | + 'hELLO wORLD' |
| 10747 | + |
| 10748 | + Note that it is not necessarily true that "s.swapcase().swapcase() |
| 10749 | + == s". For example: |
| 10750 | + |
| 10751 | + >>> 'straße'.swapcase().swapcase() |
| 10752 | + 'strasse' |
| 10753 | + |
| 10754 | + See also "str.lower()" and "str.upper()". |
10744 | 10755 |
|
10745 | 10756 | str.title() |
10746 | 10757 |
|
|
0 commit comments