|
1 | 1 | # -*- coding: utf-8 -*- |
2 | | -# Autogenerated by Sphinx on Mon Jan 4 17:25:50 2021 |
| 2 | +# Autogenerated by Sphinx on Tue Feb 2 20:44:10 2021 |
3 | 3 | topics = {'assert': 'The "assert" statement\n' |
4 | 4 | '**********************\n' |
5 | 5 | '\n' |
|
2561 | 2561 | 'usage\n' |
2562 | 2562 | 'patterns to be encapsulated for convenient reuse.\n' |
2563 | 2563 | '\n' |
2564 | | - ' with_stmt ::= "with" with_item ("," with_item)* ":" suite\n' |
2565 | | - ' with_item ::= expression ["as" target]\n' |
| 2564 | + ' with_stmt ::= "with" ( "(" with_stmt_contents ","? ' |
| 2565 | + '")" | with_stmt_contents ) ":" suite\n' |
| 2566 | + ' with_stmt_contents ::= with_item ("," with_item)*\n' |
| 2567 | + ' with_item ::= expression ["as" target]\n' |
2566 | 2568 | '\n' |
2567 | 2569 | 'The execution of the "with" statement with one “item” proceeds ' |
2568 | 2570 | 'as\n' |
|
2654 | 2656 | ' with B() as b:\n' |
2655 | 2657 | ' SUITE\n' |
2656 | 2658 | '\n' |
| 2659 | + 'You can also write multi-item context managers in multiple lines ' |
| 2660 | + 'if\n' |
| 2661 | + 'the items are surrounded by parentheses. For example:\n' |
| 2662 | + '\n' |
| 2663 | + ' with (\n' |
| 2664 | + ' A() as a,\n' |
| 2665 | + ' B() as b,\n' |
| 2666 | + ' ):\n' |
| 2667 | + ' SUITE\n' |
| 2668 | + '\n' |
2657 | 2669 | 'Changed in version 3.1: Support for multiple context ' |
2658 | 2670 | 'expressions.\n' |
2659 | 2671 | '\n' |
| 2672 | + 'Changed in version 3.10: Support for using grouping parentheses ' |
| 2673 | + 'to\n' |
| 2674 | + 'break the statement in multiple lines.\n' |
| 2675 | + '\n' |
2660 | 2676 | 'See also:\n' |
2661 | 2677 | '\n' |
2662 | 2678 | ' **PEP 343** - The “with” statement\n' |
|
5268 | 5284 | ' | | in the form ‘+000000120’. This alignment ' |
5269 | 5285 | 'option is only |\n' |
5270 | 5286 | ' | | valid for numeric types. It becomes the ' |
5271 | | - 'default when ‘0’ |\n' |
5272 | | - ' | | immediately precedes the field ' |
5273 | | - 'width. |\n' |
| 5287 | + 'default for |\n' |
| 5288 | + ' | | numbers when ‘0’ immediately precedes the ' |
| 5289 | + 'field width. |\n' |
5274 | 5290 | ' ' |
5275 | 5291 | '+-----------+------------------------------------------------------------+\n' |
5276 | 5292 | ' | "\'^\'" | Forces the field to be centered within ' |
|
5378 | 5394 | 'with an\n' |
5379 | 5395 | '*alignment* type of "\'=\'".\n' |
5380 | 5396 | '\n' |
| 5397 | + 'Changed in version 3.10: Preceding the *width* field by ' |
| 5398 | + '"\'0\'" no\n' |
| 5399 | + 'longer affects the default alignment for strings.\n' |
| 5400 | + '\n' |
5381 | 5401 | 'The *precision* is a decimal number indicating how many ' |
5382 | 5402 | 'digits should\n' |
5383 | 5403 | 'be displayed after the decimal point for a floating point ' |
|
13989 | 14009 | 'usage\n' |
13990 | 14010 | 'patterns to be encapsulated for convenient reuse.\n' |
13991 | 14011 | '\n' |
13992 | | - ' with_stmt ::= "with" with_item ("," with_item)* ":" suite\n' |
13993 | | - ' with_item ::= expression ["as" target]\n' |
| 14012 | + ' with_stmt ::= "with" ( "(" with_stmt_contents ","? ")" | ' |
| 14013 | + 'with_stmt_contents ) ":" suite\n' |
| 14014 | + ' with_stmt_contents ::= with_item ("," with_item)*\n' |
| 14015 | + ' with_item ::= expression ["as" target]\n' |
13994 | 14016 | '\n' |
13995 | 14017 | 'The execution of the "with" statement with one “item” proceeds as\n' |
13996 | 14018 | 'follows:\n' |
|
14076 | 14098 | ' with B() as b:\n' |
14077 | 14099 | ' SUITE\n' |
14078 | 14100 | '\n' |
| 14101 | + 'You can also write multi-item context managers in multiple lines if\n' |
| 14102 | + 'the items are surrounded by parentheses. For example:\n' |
| 14103 | + '\n' |
| 14104 | + ' with (\n' |
| 14105 | + ' A() as a,\n' |
| 14106 | + ' B() as b,\n' |
| 14107 | + ' ):\n' |
| 14108 | + ' SUITE\n' |
| 14109 | + '\n' |
14079 | 14110 | 'Changed in version 3.1: Support for multiple context expressions.\n' |
14080 | 14111 | '\n' |
| 14112 | + 'Changed in version 3.10: Support for using grouping parentheses to\n' |
| 14113 | + 'break the statement in multiple lines.\n' |
| 14114 | + '\n' |
14081 | 14115 | 'See also:\n' |
14082 | 14116 | '\n' |
14083 | 14117 | ' **PEP 343** - The “with” statement\n' |
|
0 commit comments