Skip to content

Commit ef2d371

Browse files
committed
Merge tag 'v3.10.0a4'
Python 3.10.0a4
2 parents af4cd16 + 445f7f5 commit ef2d371

File tree

102 files changed

+1129
-273
lines changed

Some content is hidden

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

102 files changed

+1129
-273
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_ALPHA
23-
#define PY_RELEASE_SERIAL 3
23+
#define PY_RELEASE_SERIAL 4
2424

2525
/* Version as a string */
26-
#define PY_VERSION "3.10.0a3+"
26+
#define PY_VERSION "3.10.0a4"
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: 131 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Autogenerated by Sphinx on Mon Dec 7 19:34:00 2020
2+
# Autogenerated by Sphinx on Mon Jan 4 17:25:50 2021
33
topics = {'assert': 'The "assert" statement\n'
44
'**********************\n'
55
'\n'
@@ -461,13 +461,12 @@
461461
'\n'
462462
' async_for_stmt ::= "async" for_stmt\n'
463463
'\n'
464-
'An *asynchronous iterable* is able to call asynchronous code in '
465-
'its\n'
466-
'*iter* implementation, and *asynchronous iterator* can call\n'
467-
'asynchronous code in its *next* method.\n'
464+
'An *asynchronous iterable* provides an "__aiter__" method that\n'
465+
'directly returns an *asynchronous iterator*, which can call\n'
466+
'asynchronous code in its "__anext__" method.\n'
468467
'\n'
469468
'The "async for" statement allows convenient iteration over\n'
470-
'asynchronous iterators.\n'
469+
'asynchronous iterables.\n'
471470
'\n'
472471
'The following code:\n'
473472
'\n'
@@ -2383,8 +2382,9 @@
23832382
'compatible\n'
23842383
'with an exception if it is the class or a base class of the '
23852384
'exception\n'
2386-
'object or a tuple containing an item compatible with the '
2387-
'exception.\n'
2385+
'object, or a tuple containing an item that is the class or a '
2386+
'base\n'
2387+
'class of the exception object.\n'
23882388
'\n'
23892389
'If no except clause matches the exception, the search for an '
23902390
'exception\n'
@@ -2451,11 +2451,32 @@
24512451
'(see\n'
24522452
'section The standard type hierarchy) identifying the point in '
24532453
'the\n'
2454-
'program where the exception occurred. "sys.exc_info()" values '
2455-
'are\n'
2456-
'restored to their previous values (before the call) when '
2457-
'returning\n'
2458-
'from a function that handled an exception.\n'
2454+
'program where the exception occurred. The details about the '
2455+
'exception\n'
2456+
'accessed via "sys.exc_info()" are restored to their previous '
2457+
'values\n'
2458+
'when leaving an exception handler:\n'
2459+
'\n'
2460+
' >>> print(sys.exc_info())\n'
2461+
' (None, None, None)\n'
2462+
' >>> try:\n'
2463+
' ... raise TypeError\n'
2464+
' ... except:\n'
2465+
' ... print(sys.exc_info())\n'
2466+
' ... try:\n'
2467+
' ... raise ValueError\n'
2468+
' ... except:\n'
2469+
' ... print(sys.exc_info())\n'
2470+
' ... print(sys.exc_info())\n'
2471+
' ...\n'
2472+
" (<class 'TypeError'>, TypeError(), <traceback object at "
2473+
'0x10efad080>)\n'
2474+
" (<class 'ValueError'>, ValueError(), <traceback object at "
2475+
'0x10efad040>)\n'
2476+
" (<class 'TypeError'>, TypeError(), <traceback object at "
2477+
'0x10efad080>)\n'
2478+
' >>> print(sys.exc_info())\n'
2479+
' (None, None, None)\n'
24592480
'\n'
24602481
'The optional "else" clause is executed if the control flow '
24612482
'leaves the\n'
@@ -2985,13 +3006,12 @@
29853006
'\n'
29863007
' async_for_stmt ::= "async" for_stmt\n'
29873008
'\n'
2988-
'An *asynchronous iterable* is able to call asynchronous code in '
2989-
'its\n'
2990-
'*iter* implementation, and *asynchronous iterator* can call\n'
2991-
'asynchronous code in its *next* method.\n'
3009+
'An *asynchronous iterable* provides an "__aiter__" method that\n'
3010+
'directly returns an *asynchronous iterator*, which can call\n'
3011+
'asynchronous code in its "__anext__" method.\n'
29923012
'\n'
29933013
'The "async for" statement allows convenient iteration over\n'
2994-
'asynchronous iterators.\n'
3014+
'asynchronous iterables.\n'
29953015
'\n'
29963016
'The following code:\n'
29973017
'\n'
@@ -5524,44 +5544,51 @@
55245544
' | | formats the result in either fixed-point '
55255545
'format or in |\n'
55265546
' | | scientific notation, depending on its '
5527-
'magnitude. The |\n'
5528-
' | | precise rules are as follows: suppose that '
5529-
'the result |\n'
5547+
'magnitude. A |\n'
5548+
' | | precision of "0" is treated as equivalent '
5549+
'to a precision |\n'
5550+
' | | of "1". The precise rules are as follows: '
5551+
'suppose that |\n'
5552+
' | | the result formatted with presentation '
5553+
'type "\'e\'" and |\n'
5554+
' | | precision "p-1" would have exponent '
5555+
'"exp". Then, if "m <= |\n'
5556+
' | | exp < p", where "m" is -4 for floats and '
5557+
'-6 for |\n'
5558+
' | | "Decimals", the number is formatted with '
5559+
'presentation type |\n'
5560+
' | | "\'f\'" and precision "p-1-exp". '
5561+
'Otherwise, the number is |\n'
55305562
' | | formatted with presentation type "\'e\'" '
5531-
'and precision "p-1" |\n'
5532-
' | | would have exponent "exp". Then, if "m <= '
5533-
'exp < p", where |\n'
5534-
' | | "m" is -4 for floats and -6 for '
5535-
'"Decimals", the number is |\n'
5536-
' | | formatted with presentation type "\'f\'" '
55375563
'and precision |\n'
5538-
' | | "p-1-exp". Otherwise, the number is '
5539-
'formatted with |\n'
5540-
' | | presentation type "\'e\'" and precision '
5541-
'"p-1". In both cases |\n'
5542-
' | | insignificant trailing zeros are removed '
5543-
'from the |\n'
5544-
' | | significand, and the decimal point is also '
5545-
'removed if |\n'
5546-
' | | there are no remaining digits following '
5547-
'it, unless the |\n'
5548-
' | | "\'#\'" option is used. Positive and '
5549-
'negative infinity, |\n'
5550-
' | | positive and negative zero, and nans, are '
5551-
'formatted as |\n'
5552-
' | | "inf", "-inf", "0", "-0" and "nan" '
5553-
'respectively, |\n'
5554-
' | | regardless of the precision. A precision '
5555-
'of "0" is |\n'
5556-
' | | treated as equivalent to a precision of '
5557-
'"1". With no |\n'
5558-
' | | precision given, uses a precision of "6" '
5559-
'significant |\n'
5560-
' | | digits for "float", and shows all '
5561-
'coefficient digits for |\n'
5562-
' | | '
5563-
'"Decimal". '
5564-
'|\n'
5564+
' | | "p-1". In both cases insignificant '
5565+
'trailing zeros are |\n'
5566+
' | | removed from the significand, and the '
5567+
'decimal point is |\n'
5568+
' | | also removed if there are no remaining '
5569+
'digits following |\n'
5570+
' | | it, unless the "\'#\'" option is used. '
5571+
'With no precision |\n'
5572+
' | | given, uses a precision of "6" significant '
5573+
'digits for |\n'
5574+
' | | "float". For "Decimal", the coefficient of '
5575+
'the result is |\n'
5576+
' | | formed from the coefficient digits of the '
5577+
'value; |\n'
5578+
' | | scientific notation is used for values '
5579+
'smaller than "1e-6" |\n'
5580+
' | | in absolute value and values where the '
5581+
'place value of the |\n'
5582+
' | | least significant digit is larger than 1, '
5583+
'and fixed-point |\n'
5584+
' | | notation is used otherwise. Positive and '
5585+
'negative |\n'
5586+
' | | infinity, positive and negative zero, and '
5587+
'nans, are |\n'
5588+
' | | formatted as "inf", "-inf", "0", "-0" and '
5589+
'"nan" |\n'
5590+
' | | respectively, regardless of the '
5591+
'precision. |\n'
55655592
' '
55665593
'+-----------+------------------------------------------------------------+\n'
55675594
' | "\'G\'" | General format. Same as "\'g\'" except '
@@ -5586,19 +5613,24 @@
55865613
'percent sign. |\n'
55875614
' '
55885615
'+-----------+------------------------------------------------------------+\n'
5589-
' | None | Similar to "\'g\'", except that '
5590-
'fixed-point notation, when |\n'
5591-
' | | used, has at least one digit past the '
5592-
'decimal point. The |\n'
5593-
' | | default precision is as high as needed to '
5594-
'represent the |\n'
5595-
' | | particular value. The overall effect is to '
5596-
'match the |\n'
5597-
' | | output of "str()" as altered by the other '
5598-
'format |\n'
5599-
' | | '
5600-
'modifiers. '
5601-
'|\n'
5616+
' | None | For "float" this is the same as "\'g\'", '
5617+
'except that when |\n'
5618+
' | | fixed-point notation is used to format the '
5619+
'result, it |\n'
5620+
' | | always includes at least one digit past '
5621+
'the decimal point. |\n'
5622+
' | | The precision used is as large as needed '
5623+
'to represent the |\n'
5624+
' | | given value faithfully. For "Decimal", '
5625+
'this is the same |\n'
5626+
' | | as either "\'g\'" or "\'G\'" depending on '
5627+
'the value of |\n'
5628+
' | | "context.capitals" for the current decimal '
5629+
'context. The |\n'
5630+
' | | overall effect is to match the output of '
5631+
'"str()" as |\n'
5632+
' | | altered by the other format '
5633+
'modifiers. |\n'
56025634
' '
56035635
'+-----------+------------------------------------------------------------+\n'
56045636
'\n'
@@ -5972,8 +6004,10 @@
59726004
'\n'
59736005
'Names listed in a "global" statement must not be defined as '
59746006
'formal\n'
5975-
'parameters or in a "for" loop control target, "class" definition,\n'
5976-
'function definition, "import" statement, or variable annotation.\n'
6007+
'parameters, or as targets in "with" statements or "except" '
6008+
'clauses, or\n'
6009+
'in a "for" target list, "class" definition, function definition,\n'
6010+
'"import" statement, or variable annotation.\n'
59776011
'\n'
59786012
'**CPython implementation detail:** The current implementation does '
59796013
'not\n'
@@ -7925,7 +7959,7 @@
79257959
'immediate\n'
79267960
' subclasses. This method returns a list of all those '
79277961
'references\n'
7928-
' still alive. Example:\n'
7962+
' still alive. The list is in definition order. Example:\n'
79297963
'\n'
79307964
' >>> int.__subclasses__()\n'
79317965
" [<class 'bool'>]\n"
@@ -11224,7 +11258,8 @@
1122411258
'object is “compatible” with the exception. An object is compatible\n'
1122511259
'with an exception if it is the class or a base class of the '
1122611260
'exception\n'
11227-
'object or a tuple containing an item compatible with the exception.\n'
11261+
'object, or a tuple containing an item that is the class or a base\n'
11262+
'class of the exception object.\n'
1122811263
'\n'
1122911264
'If no except clause matches the exception, the search for an '
1123011265
'exception\n'
@@ -11279,9 +11314,31 @@
1127911314
'the\n'
1128011315
'exception class, the exception instance and a traceback object (see\n'
1128111316
'section The standard type hierarchy) identifying the point in the\n'
11282-
'program where the exception occurred. "sys.exc_info()" values are\n'
11283-
'restored to their previous values (before the call) when returning\n'
11284-
'from a function that handled an exception.\n'
11317+
'program where the exception occurred. The details about the '
11318+
'exception\n'
11319+
'accessed via "sys.exc_info()" are restored to their previous values\n'
11320+
'when leaving an exception handler:\n'
11321+
'\n'
11322+
' >>> print(sys.exc_info())\n'
11323+
' (None, None, None)\n'
11324+
' >>> try:\n'
11325+
' ... raise TypeError\n'
11326+
' ... except:\n'
11327+
' ... print(sys.exc_info())\n'
11328+
' ... try:\n'
11329+
' ... raise ValueError\n'
11330+
' ... except:\n'
11331+
' ... print(sys.exc_info())\n'
11332+
' ... print(sys.exc_info())\n'
11333+
' ...\n'
11334+
" (<class 'TypeError'>, TypeError(), <traceback object at "
11335+
'0x10efad080>)\n'
11336+
" (<class 'ValueError'>, ValueError(), <traceback object at "
11337+
'0x10efad040>)\n'
11338+
" (<class 'TypeError'>, TypeError(), <traceback object at "
11339+
'0x10efad080>)\n'
11340+
' >>> print(sys.exc_info())\n'
11341+
' (None, None, None)\n'
1128511342
'\n'
1128611343
'The optional "else" clause is executed if the control flow leaves '
1128711344
'the\n'
@@ -11445,7 +11502,6 @@
1144511502
' There are two types of integers:\n'
1144611503
'\n'
1144711504
' Integers ("int")\n'
11448-
'\n'
1144911505
' These represent numbers in an unlimited range, subject to\n'
1145011506
' available (virtual) memory only. For the purpose of '
1145111507
'shift\n'

0 commit comments

Comments
 (0)