Skip to content

Commit 3173141

Browse files
committed
Python 3.10.0b2
1 parent 7fe9cad commit 3173141

File tree

56 files changed

+673
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+673
-138
lines changed

Include/patchlevel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
#define PY_MINOR_VERSION 10
2121
#define PY_MICRO_VERSION 0
2222
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA
23-
#define PY_RELEASE_SERIAL 1
23+
#define PY_RELEASE_SERIAL 2
2424

2525
/* Version as a string */
26-
#define PY_VERSION "3.10.0b1+"
26+
#define PY_VERSION "3.10.0b2"
2727
/*--end constants--*/
2828

2929
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.

Lib/pydoc_data/topics.py

Lines changed: 146 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- 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
33
topics = {'assert': 'The "assert" statement\n'
44
'**********************\n'
55
'\n'
@@ -551,13 +551,65 @@
551551
'exception.\n'
552552
' That new exception causes the old one to be lost.\n'
553553
'\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 '
555607
'function\n'
556608
' body is transformed into the function’s "__doc__" attribute '
557609
'and\n'
558610
' therefore the function’s *docstring*.\n'
559611
'\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'
561613
' body is transformed into the namespace’s "__doc__" item and\n'
562614
' therefore the class’s *docstring*.\n',
563615
'atom-identifiers': 'Identifiers (Names)\n'
@@ -1708,7 +1760,7 @@
17081760
'original global namespace. (Usually, the suite contains mostly\n'
17091761
'function definitions.) When the class’s suite finishes execution, '
17101762
'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] '
17121764
'A\n'
17131765
'class object is then created using the inheritance list for the '
17141766
'base\n'
@@ -3005,7 +3057,7 @@
30053057
'\n'
30063058
'A single underscore "_" is not a capture pattern (this is what '
30073059
'"!\'_\'"\n'
3008-
'expresses). And is instead treated as a "wildcard_pattern".\n'
3060+
'expresses). It is instead treated as a "wildcard_pattern".\n'
30093061
'\n'
30103062
'In a given pattern, a given name can only be bound once. E.g. '
30113063
'"case\n'
@@ -3033,7 +3085,10 @@
30333085
'\n'
30343086
" wildcard_pattern ::= '_'\n"
30353087
'\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'
30373092
'\n'
30383093
'In simple terms, "_" will always succeed.\n'
30393094
'\n'
@@ -3124,8 +3179,9 @@
31243179
'pattern\n'
31253180
'against a subject value:\n'
31263181
'\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'
31293185
'\n'
31303186
'2. If the subject value is an instance of "str", "bytes" or\n'
31313187
' "bytearray" the sequence pattern fails.\n'
@@ -3180,7 +3236,7 @@
31803236
'the\n'
31813237
'following happens:\n'
31823238
'\n'
3183-
'* "isinstance(<subject>, collections.abc.Sequence)"\n'
3239+
'* check "<subject>" is a sequence\n'
31843240
'\n'
31853241
'* "len(subject) == <N>"\n'
31863242
'\n'
@@ -3224,8 +3280,9 @@
32243280
'pattern\n'
32253281
'against a subject value:\n'
32263282
'\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'
32293286
'\n'
32303287
'2. If every key given in the mapping pattern is present in the '
32313288
'subject\n'
@@ -3251,7 +3308,7 @@
32513308
'the\n'
32523309
'following happens:\n'
32533310
'\n'
3254-
'* "isinstance(<subject>, collections.abc.Mapping)"\n'
3311+
'* check "<subject>" is a mapping\n'
32553312
'\n'
32563313
'* "KEY1 in <subject>"\n'
32573314
'\n'
@@ -3456,7 +3513,7 @@
34563513
'\n'
34573514
'The function definition does not execute the function body; this '
34583515
'gets\n'
3459-
'executed only when the function is called. [2]\n'
3516+
'executed only when the function is called. [4]\n'
34603517
'\n'
34613518
'A function definition may be wrapped by one or more *decorator*\n'
34623519
'expressions. Decorator expressions are evaluated when the '
@@ -3661,7 +3718,7 @@
36613718
'function definitions.) When the class’s suite finishes '
36623719
'execution, its\n'
36633720
'execution frame is discarded but its local namespace is saved. '
3664-
'[3] A\n'
3721+
'[5] A\n'
36653722
'class object is then created using the inheritance list for the '
36663723
'base\n'
36673724
'classes and the saved local namespace for the attribute '
@@ -3865,13 +3922,65 @@
38653922
'exception.\n'
38663923
' That new exception causes the old one to be lost.\n'
38673924
'\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 '
38693978
'function\n'
38703979
' body is transformed into the function’s "__doc__" attribute '
38713980
'and\n'
38723981
' therefore the function’s *docstring*.\n'
38733982
'\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 '
38753984
'class\n'
38763985
' body is transformed into the namespace’s "__doc__" item and\n'
38773986
' therefore the class’s *docstring*.\n',
@@ -6095,19 +6204,19 @@
60956204
'complex\n'
60966205
'types. For integers, when binary, octal, or hexadecimal '
60976206
'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'
61116220
'\n'
61126221
'The "\',\'" option signals the use of a comma for a '
61136222
'thousands separator.\n'
@@ -6224,8 +6333,12 @@
62246333
'+-----------+------------------------------------------------------------+\n'
62256334
' | "\'X\'" | Hex format. Outputs the number in base '
62266335
'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'
62296342
' '
62306343
'+-----------+------------------------------------------------------------+\n'
62316344
' | "\'n\'" | Number. This is the same as "\'d\'", '
@@ -6606,7 +6719,7 @@
66066719
'\n'
66076720
'The function definition does not execute the function body; this '
66086721
'gets\n'
6609-
'executed only when the function is called. [2]\n'
6722+
'executed only when the function is called. [4]\n'
66106723
'\n'
66116724
'A function definition may be wrapped by one or more *decorator*\n'
66126725
'expressions. Decorator expressions are evaluated when the '
@@ -7085,7 +7198,7 @@
70857198
' | "from" relative_module "import" "(" '
70867199
'identifier ["as" identifier]\n'
70877200
' ("," identifier ["as" identifier])* [","] ")"\n'
7088-
' | "from" module "import" "*"\n'
7201+
' | "from" relative_module "import" "*"\n'
70897202
' module ::= (identifier ".")* identifier\n'
70907203
' relative_module ::= "."* module | "."+\n'
70917204
'\n'

0 commit comments

Comments
 (0)