|
1 | 1 | # -*- coding: utf-8 -*-
|
2 |
| -# Autogenerated by Sphinx on Tue Feb 25 13:20:31 2020 |
| 2 | +# Autogenerated by Sphinx on Mon Mar 23 17:18:04 2020 |
3 | 3 | topics = {'assert': 'The "assert" statement\n'
|
4 | 4 | '**********************\n'
|
5 | 5 | '\n'
|
|
1476 | 1476 | ' | starred_and_keywords ["," '
|
1477 | 1477 | 'keywords_arguments]\n'
|
1478 | 1478 | ' | keywords_arguments\n'
|
1479 |
| - ' positional_arguments ::= ["*"] expression ("," ["*"] ' |
1480 |
| - 'expression)*\n' |
| 1479 | + ' positional_arguments ::= positional_item ("," positional_item)*\n' |
| 1480 | + ' positional_item ::= assignment_expression | "*" expression\n' |
1481 | 1481 | ' starred_and_keywords ::= ("*" expression | keyword_item)\n'
|
1482 | 1482 | ' ("," "*" expression | "," '
|
1483 | 1483 | 'keyword_item)*\n'
|
|
1717 | 1717 | 'for\n'
|
1718 | 1718 | 'function decorators. The result is then bound to the class name.\n'
|
1719 | 1719 | '\n'
|
| 1720 | + 'Changed in version 3.9: Classes may be decorated with any valid\n' |
| 1721 | + '"assignment_expression". Previously, the grammar was much more\n' |
| 1722 | + 'restrictive; see **PEP 614** for details.\n' |
| 1723 | + '\n' |
1720 | 1724 | '**Programmer’s note:** Variables defined in the class definition '
|
1721 | 1725 | 'are\n'
|
1722 | 1726 | 'class attributes; they are shared by instances. Instance '
|
|
2187 | 2191 | '\n'
|
2188 | 2192 | 'The "if" statement is used for conditional execution:\n'
|
2189 | 2193 | '\n'
|
2190 |
| - ' if_stmt ::= "if" expression ":" suite\n' |
2191 |
| - ' ("elif" expression ":" suite)*\n' |
| 2194 | + ' if_stmt ::= "if" assignment_expression ":" suite\n' |
| 2195 | + ' ("elif" assignment_expression ":" suite)*\n' |
2192 | 2196 | ' ["else" ":" suite]\n'
|
2193 | 2197 | '\n'
|
2194 | 2198 | 'It selects exactly one of the suites by evaluating the '
|
|
2211 | 2215 | 'an\n'
|
2212 | 2216 | 'expression is true:\n'
|
2213 | 2217 | '\n'
|
2214 |
| - ' while_stmt ::= "while" expression ":" suite\n' |
| 2218 | + ' while_stmt ::= "while" assignment_expression ":" suite\n' |
2215 | 2219 | ' ["else" ":" suite]\n'
|
2216 | 2220 | '\n'
|
2217 | 2221 | 'This repeatedly tests the expression and, if it is true, '
|
|
2626 | 2630 | '[parameter_list] ")"\n'
|
2627 | 2631 | ' ["->" expression] ":" suite\n'
|
2628 | 2632 | ' decorators ::= decorator+\n'
|
2629 |
| - ' decorator ::= "@" dotted_name ["(" ' |
2630 |
| - '[argument_list [","]] ")"] NEWLINE\n' |
| 2633 | + ' decorator ::= "@" assignment_expression ' |
| 2634 | + 'NEWLINE\n' |
2631 | 2635 | ' dotted_name ::= identifier ("." identifier)*\n'
|
2632 | 2636 | ' parameter_list ::= defparameter ("," '
|
2633 | 2637 | 'defparameter)* "," "/" ["," [parameter_list_no_posonly]]\n'
|
|
2681 | 2685 | 'the name\n'
|
2682 | 2686 | '"func".\n'
|
2683 | 2687 | '\n'
|
| 2688 | + 'Changed in version 3.9: Functions may be decorated with any ' |
| 2689 | + 'valid\n' |
| 2690 | + '"assignment_expression". Previously, the grammar was much more\n' |
| 2691 | + 'restrictive; see **PEP 614** for details.\n' |
| 2692 | + '\n' |
2684 | 2693 | 'When one or more *parameters* have the form *parameter* "="\n'
|
2685 | 2694 | '*expression*, the function is said to have “default parameter '
|
2686 | 2695 | 'values.”\n'
|
|
2882 | 2891 | 'function decorators. The result is then bound to the class '
|
2883 | 2892 | 'name.\n'
|
2884 | 2893 | '\n'
|
| 2894 | + 'Changed in version 3.9: Classes may be decorated with any valid\n' |
| 2895 | + '"assignment_expression". Previously, the grammar was much more\n' |
| 2896 | + 'restrictive; see **PEP 614** for details.\n' |
| 2897 | + '\n' |
2885 | 2898 | '**Programmer’s note:** Variables defined in the class definition '
|
2886 | 2899 | 'are\n'
|
2887 | 2900 | 'class attributes; they are shared by instances. Instance '
|
|
4403 | 4416 | '\n'
|
4404 | 4417 | 'The "if" statement is used for conditional execution:\n'
|
4405 | 4418 | '\n'
|
4406 |
| - ' if_stmt ::= "if" expression ":" suite\n' |
4407 |
| - ' ("elif" expression ":" suite)*\n' |
| 4419 | + ' if_stmt ::= "if" assignment_expression ":" suite\n' |
| 4420 | + ' ("elif" assignment_expression ":" suite)*\n' |
4408 | 4421 | ' ["else" ":" suite]\n'
|
4409 | 4422 | '\n'
|
4410 | 4423 | 'It selects exactly one of the suites by evaluating the expressions '
|
|
4824 | 4837 | '[","]\n'
|
4825 | 4838 | ' starred_expression ::= expression | (starred_item ",")* '
|
4826 | 4839 | '[starred_item]\n'
|
4827 |
| - ' starred_item ::= expression | "*" or_expr\n' |
| 4840 | + ' starred_item ::= assignment_expression | "*" or_expr\n' |
4828 | 4841 | '\n'
|
4829 | 4842 | 'Except when part of a list or set display, an expression list\n'
|
4830 | 4843 | 'containing at least one comma yields a tuple. The length of '
|
|
5134 | 5147 | 'only\n'
|
5135 | 5148 | 'supported by the numeric types.\n'
|
5136 | 5149 | '\n'
|
5137 |
| - 'A general convention is that an empty format string ("""") ' |
| 5150 | + 'A general convention is that an empty format specification ' |
5138 | 5151 | 'produces\n'
|
5139 | 5152 | 'the same result as if you had called "str()" on the value. '
|
5140 | 5153 | 'A non-empty\n'
|
5141 |
| - 'format string typically modifies the result.\n' |
| 5154 | + 'format specification typically modifies the result.\n' |
5142 | 5155 | '\n'
|
5143 | 5156 | 'The general form of a *standard format specifier* is:\n'
|
5144 | 5157 | '\n'
|
|
5693 | 5706 | '[parameter_list] ")"\n'
|
5694 | 5707 | ' ["->" expression] ":" suite\n'
|
5695 | 5708 | ' decorators ::= decorator+\n'
|
5696 |
| - ' decorator ::= "@" dotted_name ["(" ' |
5697 |
| - '[argument_list [","]] ")"] NEWLINE\n' |
| 5709 | + ' decorator ::= "@" assignment_expression ' |
| 5710 | + 'NEWLINE\n' |
5698 | 5711 | ' dotted_name ::= identifier ("." identifier)*\n'
|
5699 | 5712 | ' parameter_list ::= defparameter ("," '
|
5700 | 5713 | 'defparameter)* "," "/" ["," [parameter_list_no_posonly]]\n'
|
|
5748 | 5761 | 'the name\n'
|
5749 | 5762 | '"func".\n'
|
5750 | 5763 | '\n'
|
| 5764 | + 'Changed in version 3.9: Functions may be decorated with any ' |
| 5765 | + 'valid\n' |
| 5766 | + '"assignment_expression". Previously, the grammar was much more\n' |
| 5767 | + 'restrictive; see **PEP 614** for details.\n' |
| 5768 | + '\n' |
5751 | 5769 | 'When one or more *parameters* have the form *parameter* "="\n'
|
5752 | 5770 | '*expression*, the function is said to have “default parameter '
|
5753 | 5771 | 'values.”\n'
|
|
6119 | 6137 | '\n'
|
6120 | 6138 | 'The "if" statement is used for conditional execution:\n'
|
6121 | 6139 | '\n'
|
6122 |
| - ' if_stmt ::= "if" expression ":" suite\n' |
6123 |
| - ' ("elif" expression ":" suite)*\n' |
| 6140 | + ' if_stmt ::= "if" assignment_expression ":" suite\n' |
| 6141 | + ' ("elif" assignment_expression ":" suite)*\n' |
6124 | 6142 | ' ["else" ":" suite]\n'
|
6125 | 6143 | '\n'
|
6126 | 6144 | 'It selects exactly one of the suites by evaluating the expressions '
|
|
9018 | 9036 | '\n'
|
9019 | 9037 | 'If the metaclass has no "__prepare__" attribute, then the '
|
9020 | 9038 | 'class\n'
|
9021 |
| - 'namespace is initialised as an empty "dict()".\n' |
| 9039 | + 'namespace is initialised as an empty ordered mapping.\n' |
9022 | 9040 | '\n'
|
9023 | 9041 | 'See also:\n'
|
9024 | 9042 | '\n'
|
@@ -11196,10 +11214,17 @@
|
11196 | 11214 | 'for\n'
|
11197 | 11215 | ' the operands provided. (The interpreter will then try the\n'
|
11198 | 11216 | ' reflected operation, or some other fallback, depending on the\n'
|
11199 |
| - ' operator.) Its truth value is true.\n' |
| 11217 | + ' operator.) It should not be evaluated in a boolean context.\n' |
11200 | 11218 | '\n'
|
11201 | 11219 | ' See Implementing the arithmetic operations for more details.\n'
|
11202 | 11220 | '\n'
|
| 11221 | + ' Changed in version 3.9: Evaluating "NotImplemented" in a ' |
| 11222 | + 'boolean\n' |
| 11223 | + ' context is deprecated. While it currently evaluates as true, it\n' |
| 11224 | + ' will emit a "DeprecationWarning". It will raise a "TypeError" in ' |
| 11225 | + 'a\n' |
| 11226 | + ' future version of Python.\n' |
| 11227 | + '\n' |
11203 | 11228 | 'Ellipsis\n'
|
11204 | 11229 | ' This type has a single value. There is a single object with '
|
11205 | 11230 | 'this\n'
|
|
12487 | 12512 | ' >>> d.values() == d.values()\n'
|
12488 | 12513 | ' False\n'
|
12489 | 12514 | '\n'
|
| 12515 | + ' d | other\n' |
| 12516 | + '\n' |
| 12517 | + ' Create a new dictionary with the merged keys and ' |
| 12518 | + 'values of *d*\n' |
| 12519 | + ' and *other*, which must both be dictionaries. The ' |
| 12520 | + 'values of\n' |
| 12521 | + ' *other* take priority when *d* and *other* share ' |
| 12522 | + 'keys.\n' |
| 12523 | + '\n' |
| 12524 | + ' New in version 3.9.\n' |
| 12525 | + '\n' |
| 12526 | + ' d |= other\n' |
| 12527 | + '\n' |
| 12528 | + ' Update the dictionary *d* with keys and values from ' |
| 12529 | + '*other*,\n' |
| 12530 | + ' which may be either a *mapping* or an *iterable* of ' |
| 12531 | + 'key/value\n' |
| 12532 | + ' pairs. The values of *other* take priority when *d* ' |
| 12533 | + 'and *other*\n' |
| 12534 | + ' share keys.\n' |
| 12535 | + '\n' |
| 12536 | + ' New in version 3.9.\n' |
| 12537 | + '\n' |
12490 | 12538 | ' Dictionaries compare equal if and only if they have the '
|
12491 | 12539 | 'same "(key,\n'
|
12492 | 12540 | ' value)" pairs (regardless of ordering). Order comparisons '
|
|
13616 | 13664 | 'The "while" statement is used for repeated execution as long as an\n'
|
13617 | 13665 | 'expression is true:\n'
|
13618 | 13666 | '\n'
|
13619 |
| - ' while_stmt ::= "while" expression ":" suite\n' |
| 13667 | + ' while_stmt ::= "while" assignment_expression ":" suite\n' |
13620 | 13668 | ' ["else" ":" suite]\n'
|
13621 | 13669 | '\n'
|
13622 | 13670 | 'This repeatedly tests the expression and, if it is true, executes '
|
|