Skip to content

Commit 1016ef3

Browse files
committed
Python 3.9.7
1 parent 9827710 commit 1016ef3

File tree

94 files changed

+984
-209
lines changed

Some content is hidden

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

94 files changed

+984
-209
lines changed

Include/patchlevel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
/*--start constants--*/
1919
#define PY_MAJOR_VERSION 3
2020
#define PY_MINOR_VERSION 9
21-
#define PY_MICRO_VERSION 6
21+
#define PY_MICRO_VERSION 7
2222
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
2323
#define PY_RELEASE_SERIAL 0
2424

2525
/* Version as a string */
26-
#define PY_VERSION "3.9.6+"
26+
#define PY_VERSION "3.9.7"
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: 56 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Autogenerated by Sphinx on Mon Jun 28 10:13:28 2021
2+
# Autogenerated by Sphinx on Mon Aug 30 20:40:44 2021
33
topics = {'assert': 'The "assert" statement\n'
44
'**********************\n'
55
'\n'
@@ -1259,6 +1259,10 @@
12591259
'In the latter case, sequence repetition is performed; a negative\n'
12601260
'repetition factor yields an empty sequence.\n'
12611261
'\n'
1262+
'This operation can be customized using the special "__mul__()" '
1263+
'and\n'
1264+
'"__rmul__()" methods.\n'
1265+
'\n'
12621266
'The "@" (at) operator is intended to be used for matrix\n'
12631267
'multiplication. No builtin Python types implement this operator.\n'
12641268
'\n'
@@ -1274,6 +1278,10 @@
12741278
'result. Division by zero raises the "ZeroDivisionError" '
12751279
'exception.\n'
12761280
'\n'
1281+
'This operation can be customized using the special "__truediv__()" '
1282+
'and\n'
1283+
'"__floordiv__()" methods.\n'
1284+
'\n'
12771285
'The "%" (modulo) operator yields the remainder from the division '
12781286
'of\n'
12791287
'the first argument by the second. The numeric arguments are '
@@ -1305,6 +1313,10 @@
13051313
'string formatting is described in the Python Library Reference,\n'
13061314
'section printf-style String Formatting.\n'
13071315
'\n'
1316+
'The *modulo* operation can be customized using the special '
1317+
'"__mod__()"\n'
1318+
'method.\n'
1319+
'\n'
13081320
'The floor division operator, the modulo operator, and the '
13091321
'"divmod()"\n'
13101322
'function are not defined for complex numbers. Instead, convert to '
@@ -1319,9 +1331,16 @@
13191331
'and then added together. In the latter case, the sequences are\n'
13201332
'concatenated.\n'
13211333
'\n'
1334+
'This operation can be customized using the special "__add__()" '
1335+
'and\n'
1336+
'"__radd__()" methods.\n'
1337+
'\n'
13221338
'The "-" (subtraction) operator yields the difference of its '
13231339
'arguments.\n'
1324-
'The numeric arguments are first converted to a common type.\n',
1340+
'The numeric arguments are first converted to a common type.\n'
1341+
'\n'
1342+
'This operation can be customized using the special "__sub__()" '
1343+
'method.\n',
13251344
'bitwise': 'Binary bitwise operations\n'
13261345
'*************************\n'
13271346
'\n'
@@ -1334,14 +1353,18 @@
13341353
'\n'
13351354
'The "&" operator yields the bitwise AND of its arguments, which '
13361355
'must\n'
1337-
'be integers.\n'
1356+
'be integers or one of them must be a custom object overriding\n'
1357+
'"__and__()" or "__rand__()" special methods.\n'
13381358
'\n'
13391359
'The "^" operator yields the bitwise XOR (exclusive OR) of its\n'
1340-
'arguments, which must be integers.\n'
1360+
'arguments, which must be integers or one of them must be a '
1361+
'custom\n'
1362+
'object overriding "__xor__()" or "__rxor__()" special methods.\n'
13411363
'\n'
13421364
'The "|" operator yields the bitwise (inclusive) OR of its '
13431365
'arguments,\n'
1344-
'which must be integers.\n',
1366+
'which must be integers or one of them must be a custom object\n'
1367+
'overriding "__or__()" or "__ror__()" special methods.\n',
13451368
'bltin-code-objects': 'Code Objects\n'
13461369
'************\n'
13471370
'\n'
@@ -1787,7 +1810,11 @@
17871810
' comp_operator ::= "<" | ">" | "==" | ">=" | "<=" | "!="\n'
17881811
' | "is" ["not"] | ["not"] "in"\n'
17891812
'\n'
1790-
'Comparisons yield boolean values: "True" or "False".\n'
1813+
'Comparisons yield boolean values: "True" or "False". Custom '
1814+
'*rich\n'
1815+
'comparison methods* may return non-boolean values. In this '
1816+
'case Python\n'
1817+
'will call "bool()" on such value in boolean contexts.\n'
17911818
'\n'
17921819
'Comparisons can be chained arbitrarily, e.g., "x < y <= z" '
17931820
'is\n'
@@ -7472,7 +7499,10 @@
74727499
'"ZeroDivisionError".\n'
74737500
'Raising a negative number to a fractional power results in a '
74747501
'"complex"\n'
7475-
'number. (In earlier versions it raised a "ValueError".)\n',
7502+
'number. (In earlier versions it raised a "ValueError".)\n'
7503+
'\n'
7504+
'This operation can be customized using the special "__pow__()" '
7505+
'method.\n',
74767506
'raise': 'The "raise" statement\n'
74777507
'*********************\n'
74787508
'\n'
@@ -7872,6 +7902,10 @@
78727902
'the\n'
78737903
'second argument.\n'
78747904
'\n'
7905+
'This operation can be customized using the special '
7906+
'"__lshift__()" and\n'
7907+
'"__rshift__()" methods.\n'
7908+
'\n'
78757909
'A right shift by *n* bits is defined as floor division by '
78767910
'"pow(2,n)".\n'
78777911
'A left shift by *n* bits is defined as multiplication with '
@@ -10092,7 +10126,7 @@
1009210126
'*start* and\n'
1009310127
' *end* are interpreted as in slice notation.\n'
1009410128
'\n'
10095-
"str.encode(encoding='utf-8', errors='strict')\n"
10129+
'str.encode(encoding="utf-8", errors="strict")\n'
1009610130
'\n'
1009710131
' Return an encoded version of the string as a bytes '
1009810132
'object. Default\n'
@@ -10598,7 +10632,7 @@
1059810632
'followed by\n'
1059910633
' the string itself.\n'
1060010634
'\n'
10601-
'str.rsplit(sep=None, maxsplit=- 1)\n'
10635+
'str.rsplit(sep=None, maxsplit=-1)\n'
1060210636
'\n'
1060310637
' Return a list of the words in the string, using *sep* '
1060410638
'as the\n'
@@ -10639,7 +10673,7 @@
1063910673
" >>> 'Monty Python'.removesuffix(' Python')\n"
1064010674
" 'Monty'\n"
1064110675
'\n'
10642-
'str.split(sep=None, maxsplit=- 1)\n'
10676+
'str.split(sep=None, maxsplit=-1)\n'
1064310677
'\n'
1064410678
' Return a list of the words in the string, using *sep* '
1064510679
'as the\n'
@@ -11611,7 +11645,7 @@
1161111645
' points. All the code points in the range "U+0000 - '
1161211646
'U+10FFFF"\n'
1161311647
' can be represented in a string. Python doesn’t have a '
11614-
'*char*\n'
11648+
'"char"\n'
1161511649
' type; instead, every code point in the string is '
1161611650
'represented\n'
1161711651
' as a string object with length "1". The built-in '
@@ -13419,7 +13453,7 @@
1341913453
'| | "s[i:i] = '
1342013454
'[x]") | |\n'
1342113455
'+--------------------------------+----------------------------------+-----------------------+\n'
13422-
'| "s.pop([i])" | retrieves the item at *i* '
13456+
'| "s.pop()" or "s.pop(i)" | retrieves the item at *i* '
1342313457
'and | (2) |\n'
1342413458
'| | also removes it from '
1342513459
'*s* | |\n'
@@ -13882,7 +13916,7 @@
1388213916
'| | "s[i:i] = '
1388313917
'[x]") | |\n'
1388413918
'+--------------------------------+----------------------------------+-----------------------+\n'
13885-
'| "s.pop([i])" | retrieves the item at '
13919+
'| "s.pop()" or "s.pop(i)" | retrieves the item at '
1388613920
'*i* and | (2) |\n'
1388713921
'| | also removes it from '
1388813922
'*s* | |\n'
@@ -13947,15 +13981,21 @@
1394713981
' u_expr ::= power | "-" u_expr | "+" u_expr | "~" u_expr\n'
1394813982
'\n'
1394913983
'The unary "-" (minus) operator yields the negation of its numeric\n'
13950-
'argument.\n'
13984+
'argument; the operation can be overridden with the "__neg__()" '
13985+
'special\n'
13986+
'method.\n'
1395113987
'\n'
1395213988
'The unary "+" (plus) operator yields its numeric argument '
13953-
'unchanged.\n'
13989+
'unchanged;\n'
13990+
'the operation can be overridden with the "__pos__()" special '
13991+
'method.\n'
1395413992
'\n'
1395513993
'The unary "~" (invert) operator yields the bitwise inversion of '
1395613994
'its\n'
1395713995
'integer argument. The bitwise inversion of "x" is defined as\n'
13958-
'"-(x+1)". It only applies to integral numbers.\n'
13996+
'"-(x+1)". It only applies to integral numbers or to custom '
13997+
'objects\n'
13998+
'that override the "__invert__()" special method.\n'
1395913999
'\n'
1396014000
'In all three cases, if the argument does not have the proper type, '
1396114001
'a\n'

0 commit comments

Comments
 (0)