|
1 | 1 | # -*- coding: utf-8 -*-
|
2 |
| -# Autogenerated by Sphinx on Mon May 3 20:34:17 2021 |
| 2 | +# Autogenerated by Sphinx on Mon May 31 12:30:19 2021 |
3 | 3 | topics = {'assert': 'The "assert" statement\n'
|
4 | 4 | '**********************\n'
|
5 | 5 | '\n'
|
|
551 | 551 | 'exception.\n'
|
552 | 552 | ' That new exception causes the old one to be lost.\n'
|
553 | 553 | '\n'
|
554 |
| - '[2] A string literal appearing as the first statement in the ' |
| 554 | + '[2] In pattern matching, a sequence is defined as one of the\n' |
| 555 | + ' following:\n' |
| 556 | + '\n' |
| 557 | + ' * a class that inherits from "collections.abc.Sequence"\n' |
| 558 | + '\n' |
| 559 | + ' * a Python class that has been registered as\n' |
| 560 | + ' "collections.abc.Sequence"\n' |
| 561 | + '\n' |
| 562 | + ' * a builtin class that has its (CPython) ' |
| 563 | + '"Py_TPFLAGS_SEQUENCE"\n' |
| 564 | + ' bit set\n' |
| 565 | + '\n' |
| 566 | + ' * a class that inherits from any of the above\n' |
| 567 | + '\n' |
| 568 | + ' The following standard library classes are sequences:\n' |
| 569 | + '\n' |
| 570 | + ' * "array.array"\n' |
| 571 | + '\n' |
| 572 | + ' * "collections.deque"\n' |
| 573 | + '\n' |
| 574 | + ' * "list"\n' |
| 575 | + '\n' |
| 576 | + ' * "memoryview"\n' |
| 577 | + '\n' |
| 578 | + ' * "range"\n' |
| 579 | + '\n' |
| 580 | + ' * "tuple"\n' |
| 581 | + '\n' |
| 582 | + ' Note:\n' |
| 583 | + '\n' |
| 584 | + ' Subject values of type "str", "bytes", and "bytearray" do ' |
| 585 | + 'not\n' |
| 586 | + ' match sequence patterns.\n' |
| 587 | + '\n' |
| 588 | + '[3] In pattern matching, a mapping is defined as one of the ' |
| 589 | + 'following:\n' |
| 590 | + '\n' |
| 591 | + ' * a class that inherits from "collections.abc.Mapping"\n' |
| 592 | + '\n' |
| 593 | + ' * a Python class that has been registered as\n' |
| 594 | + ' "collections.abc.Mapping"\n' |
| 595 | + '\n' |
| 596 | + ' * a builtin class that has its (CPython) ' |
| 597 | + '"Py_TPFLAGS_MAPPING"\n' |
| 598 | + ' bit set\n' |
| 599 | + '\n' |
| 600 | + ' * a class that inherits from any of the above\n' |
| 601 | + '\n' |
| 602 | + ' The standard library classes "dict" and ' |
| 603 | + '"types.MappingProxyType"\n' |
| 604 | + ' are mappings.\n' |
| 605 | + '\n' |
| 606 | + '[4] A string literal appearing as the first statement in the ' |
555 | 607 | 'function\n'
|
556 | 608 | ' body is transformed into the function’s "__doc__" attribute '
|
557 | 609 | 'and\n'
|
558 | 610 | ' therefore the function’s *docstring*.\n'
|
559 | 611 | '\n'
|
560 |
| - '[3] A string literal appearing as the first statement in the class\n' |
| 612 | + '[5] A string literal appearing as the first statement in the class\n' |
561 | 613 | ' body is transformed into the namespace’s "__doc__" item and\n'
|
562 | 614 | ' therefore the class’s *docstring*.\n',
|
563 | 615 | 'atom-identifiers': 'Identifiers (Names)\n'
|
|
1708 | 1760 | 'original global namespace. (Usually, the suite contains mostly\n'
|
1709 | 1761 | 'function definitions.) When the class’s suite finishes execution, '
|
1710 | 1762 | 'its\n'
|
1711 |
| - 'execution frame is discarded but its local namespace is saved. [3] ' |
| 1763 | + 'execution frame is discarded but its local namespace is saved. [5] ' |
1712 | 1764 | 'A\n'
|
1713 | 1765 | 'class object is then created using the inheritance list for the '
|
1714 | 1766 | 'base\n'
|
|
3005 | 3057 | '\n'
|
3006 | 3058 | 'A single underscore "_" is not a capture pattern (this is what '
|
3007 | 3059 | '"!\'_\'"\n'
|
3008 |
| - 'expresses). And is instead treated as a "wildcard_pattern".\n' |
| 3060 | + 'expresses). It is instead treated as a "wildcard_pattern".\n' |
3009 | 3061 | '\n'
|
3010 | 3062 | 'In a given pattern, a given name can only be bound once. E.g. '
|
3011 | 3063 | '"case\n'
|
|
3033 | 3085 | '\n'
|
3034 | 3086 | " wildcard_pattern ::= '_'\n"
|
3035 | 3087 | '\n'
|
3036 |
| - '"_" is a soft keyword.\n' |
| 3088 | + '"_" is a soft keyword within any pattern, but only within ' |
| 3089 | + 'patterns.\n' |
| 3090 | + 'It is an identifier, as usual, even within "match" subject\n' |
| 3091 | + 'expressions, "guard"s, and "case" blocks.\n' |
3037 | 3092 | '\n'
|
3038 | 3093 | 'In simple terms, "_" will always succeed.\n'
|
3039 | 3094 | '\n'
|
|
3124 | 3179 | 'pattern\n'
|
3125 | 3180 | 'against a subject value:\n'
|
3126 | 3181 | '\n'
|
3127 |
| - '1. If the subject value is not an instance of a\n' |
3128 |
| - ' "collections.abc.Sequence" the sequence pattern fails.\n' |
| 3182 | + '1. If the subject value is not a sequence [2], the sequence ' |
| 3183 | + 'pattern\n' |
| 3184 | + ' fails.\n' |
3129 | 3185 | '\n'
|
3130 | 3186 | '2. If the subject value is an instance of "str", "bytes" or\n'
|
3131 | 3187 | ' "bytearray" the sequence pattern fails.\n'
|
|
3180 | 3236 | 'the\n'
|
3181 | 3237 | 'following happens:\n'
|
3182 | 3238 | '\n'
|
3183 |
| - '* "isinstance(<subject>, collections.abc.Sequence)"\n' |
| 3239 | + '* check "<subject>" is a sequence\n' |
3184 | 3240 | '\n'
|
3185 | 3241 | '* "len(subject) == <N>"\n'
|
3186 | 3242 | '\n'
|
|
3224 | 3280 | 'pattern\n'
|
3225 | 3281 | 'against a subject value:\n'
|
3226 | 3282 | '\n'
|
3227 |
| - '1. If the subject value is not an instance of\n' |
3228 |
| - ' "collections.abc.Mapping", the mapping pattern fails.\n' |
| 3283 | + '1. If the subject value is not a mapping [3],the mapping ' |
| 3284 | + 'pattern\n' |
| 3285 | + ' fails.\n' |
3229 | 3286 | '\n'
|
3230 | 3287 | '2. If every key given in the mapping pattern is present in the '
|
3231 | 3288 | 'subject\n'
|
|
3251 | 3308 | 'the\n'
|
3252 | 3309 | 'following happens:\n'
|
3253 | 3310 | '\n'
|
3254 |
| - '* "isinstance(<subject>, collections.abc.Mapping)"\n' |
| 3311 | + '* check "<subject>" is a mapping\n' |
3255 | 3312 | '\n'
|
3256 | 3313 | '* "KEY1 in <subject>"\n'
|
3257 | 3314 | '\n'
|
|
3456 | 3513 | '\n'
|
3457 | 3514 | 'The function definition does not execute the function body; this '
|
3458 | 3515 | 'gets\n'
|
3459 |
| - 'executed only when the function is called. [2]\n' |
| 3516 | + 'executed only when the function is called. [4]\n' |
3460 | 3517 | '\n'
|
3461 | 3518 | 'A function definition may be wrapped by one or more *decorator*\n'
|
3462 | 3519 | 'expressions. Decorator expressions are evaluated when the '
|
|
3661 | 3718 | 'function definitions.) When the class’s suite finishes '
|
3662 | 3719 | 'execution, its\n'
|
3663 | 3720 | 'execution frame is discarded but its local namespace is saved. '
|
3664 |
| - '[3] A\n' |
| 3721 | + '[5] A\n' |
3665 | 3722 | 'class object is then created using the inheritance list for the '
|
3666 | 3723 | 'base\n'
|
3667 | 3724 | 'classes and the saved local namespace for the attribute '
|
|
3865 | 3922 | 'exception.\n'
|
3866 | 3923 | ' That new exception causes the old one to be lost.\n'
|
3867 | 3924 | '\n'
|
3868 |
| - '[2] A string literal appearing as the first statement in the ' |
| 3925 | + '[2] In pattern matching, a sequence is defined as one of the\n' |
| 3926 | + ' following:\n' |
| 3927 | + '\n' |
| 3928 | + ' * a class that inherits from "collections.abc.Sequence"\n' |
| 3929 | + '\n' |
| 3930 | + ' * a Python class that has been registered as\n' |
| 3931 | + ' "collections.abc.Sequence"\n' |
| 3932 | + '\n' |
| 3933 | + ' * a builtin class that has its (CPython) ' |
| 3934 | + '"Py_TPFLAGS_SEQUENCE"\n' |
| 3935 | + ' bit set\n' |
| 3936 | + '\n' |
| 3937 | + ' * a class that inherits from any of the above\n' |
| 3938 | + '\n' |
| 3939 | + ' The following standard library classes are sequences:\n' |
| 3940 | + '\n' |
| 3941 | + ' * "array.array"\n' |
| 3942 | + '\n' |
| 3943 | + ' * "collections.deque"\n' |
| 3944 | + '\n' |
| 3945 | + ' * "list"\n' |
| 3946 | + '\n' |
| 3947 | + ' * "memoryview"\n' |
| 3948 | + '\n' |
| 3949 | + ' * "range"\n' |
| 3950 | + '\n' |
| 3951 | + ' * "tuple"\n' |
| 3952 | + '\n' |
| 3953 | + ' Note:\n' |
| 3954 | + '\n' |
| 3955 | + ' Subject values of type "str", "bytes", and "bytearray" do ' |
| 3956 | + 'not\n' |
| 3957 | + ' match sequence patterns.\n' |
| 3958 | + '\n' |
| 3959 | + '[3] In pattern matching, a mapping is defined as one of the ' |
| 3960 | + 'following:\n' |
| 3961 | + '\n' |
| 3962 | + ' * a class that inherits from "collections.abc.Mapping"\n' |
| 3963 | + '\n' |
| 3964 | + ' * a Python class that has been registered as\n' |
| 3965 | + ' "collections.abc.Mapping"\n' |
| 3966 | + '\n' |
| 3967 | + ' * a builtin class that has its (CPython) ' |
| 3968 | + '"Py_TPFLAGS_MAPPING"\n' |
| 3969 | + ' bit set\n' |
| 3970 | + '\n' |
| 3971 | + ' * a class that inherits from any of the above\n' |
| 3972 | + '\n' |
| 3973 | + ' The standard library classes "dict" and ' |
| 3974 | + '"types.MappingProxyType"\n' |
| 3975 | + ' are mappings.\n' |
| 3976 | + '\n' |
| 3977 | + '[4] A string literal appearing as the first statement in the ' |
3869 | 3978 | 'function\n'
|
3870 | 3979 | ' body is transformed into the function’s "__doc__" attribute '
|
3871 | 3980 | 'and\n'
|
3872 | 3981 | ' therefore the function’s *docstring*.\n'
|
3873 | 3982 | '\n'
|
3874 |
| - '[3] A string literal appearing as the first statement in the ' |
| 3983 | + '[5] A string literal appearing as the first statement in the ' |
3875 | 3984 | 'class\n'
|
3876 | 3985 | ' body is transformed into the namespace’s "__doc__" item and\n'
|
3877 | 3986 | ' therefore the class’s *docstring*.\n',
|
|
6095 | 6204 | 'complex\n'
|
6096 | 6205 | 'types. For integers, when binary, octal, or hexadecimal '
|
6097 | 6206 | 'output is\n'
|
6098 |
| - 'used, this option adds the prefix respective "\'0b\'", ' |
6099 |
| - '"\'0o\'", or "\'0x\'"\n' |
6100 |
| - 'to the output value. For float and complex the alternate ' |
6101 |
| - 'form causes\n' |
6102 |
| - 'the result of the conversion to always contain a ' |
6103 |
| - 'decimal-point\n' |
6104 |
| - 'character, even if no digits follow it. Normally, a ' |
6105 |
| - 'decimal-point\n' |
6106 |
| - 'character appears in the result of these conversions only ' |
6107 |
| - 'if a digit\n' |
6108 |
| - 'follows it. In addition, for "\'g\'" and "\'G\'" ' |
6109 |
| - 'conversions, trailing\n' |
6110 |
| - 'zeros are not removed from the result.\n' |
| 6207 | + 'used, this option adds the respective prefix "\'0b\'", ' |
| 6208 | + '"\'0o\'", "\'0x\'",\n' |
| 6209 | + 'or "\'0X\'" to the output value. For float and complex the ' |
| 6210 | + 'alternate\n' |
| 6211 | + 'form causes the result of the conversion to always contain ' |
| 6212 | + 'a decimal-\n' |
| 6213 | + 'point character, even if no digits follow it. Normally, a ' |
| 6214 | + 'decimal-\n' |
| 6215 | + 'point character appears in the result of these conversions ' |
| 6216 | + 'only if a\n' |
| 6217 | + 'digit follows it. In addition, for "\'g\'" and "\'G\'" ' |
| 6218 | + 'conversions,\n' |
| 6219 | + 'trailing zeros are not removed from the result.\n' |
6111 | 6220 | '\n'
|
6112 | 6221 | 'The "\',\'" option signals the use of a comma for a '
|
6113 | 6222 | 'thousands separator.\n'
|
|
6224 | 6333 | '+-----------+------------------------------------------------------------+\n'
|
6225 | 6334 | ' | "\'X\'" | Hex format. Outputs the number in base '
|
6226 | 6335 | '16, using upper- |\n'
|
6227 |
| - ' | | case letters for the digits above ' |
6228 |
| - '9. |\n' |
| 6336 | + ' | | case letters for the digits above 9. In ' |
| 6337 | + 'case "\'#\'" is |\n' |
| 6338 | + ' | | specified, the prefix "\'0x\'" will be ' |
| 6339 | + 'upper-cased to "\'0X\'" |\n' |
| 6340 | + ' | | as ' |
| 6341 | + 'well. |\n' |
6229 | 6342 | ' '
|
6230 | 6343 | '+-----------+------------------------------------------------------------+\n'
|
6231 | 6344 | ' | "\'n\'" | Number. This is the same as "\'d\'", '
|
|
6606 | 6719 | '\n'
|
6607 | 6720 | 'The function definition does not execute the function body; this '
|
6608 | 6721 | 'gets\n'
|
6609 |
| - 'executed only when the function is called. [2]\n' |
| 6722 | + 'executed only when the function is called. [4]\n' |
6610 | 6723 | '\n'
|
6611 | 6724 | 'A function definition may be wrapped by one or more *decorator*\n'
|
6612 | 6725 | 'expressions. Decorator expressions are evaluated when the '
|
|
7085 | 7198 | ' | "from" relative_module "import" "(" '
|
7086 | 7199 | 'identifier ["as" identifier]\n'
|
7087 | 7200 | ' ("," identifier ["as" identifier])* [","] ")"\n'
|
7088 |
| - ' | "from" module "import" "*"\n' |
| 7201 | + ' | "from" relative_module "import" "*"\n' |
7089 | 7202 | ' module ::= (identifier ".")* identifier\n'
|
7090 | 7203 | ' relative_module ::= "."* module | "."+\n'
|
7091 | 7204 | '\n'
|
|
0 commit comments