8000 Merge tag 'v3.8.0a4' · python/cpython@bbbdc2b · GitHub
[go: up one dir, main page]

Skip to content

Commit bbbdc2b

Browse files
committed
Merge tag 'v3.8.0a4'
Python 3.8.0a4
2 parents 11a8832 + c1004b8 commit bbbdc2b

File tree

139 files changed

+1477
-385
lines changed

Some content is hidden

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

139 files changed

+1477
-385
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 8
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.8.0a3+"
26+
#define PY_VERSION "3.8.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: 53 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Autogenerated by Sphinx on Mon Mar 25 20:32:23 2019
2+
# Autogenerated by Sphinx on Mon May 6 20:27:55 2019
33
topics = {'assert': 'The "assert" statement\n'
44
'**********************\n'
55
'\n'
@@ -162,20 +162,21 @@
162162
'\n'
163163
' Note: If the object is a class instance and the attribute '
164164
'reference\n'
165-
' occurs on both sides of the assignment operator, the RHS '
166-
'expression,\n'
167-
' "a.x" can access either an instance attribute or (if no '
168-
'instance\n'
169-
' attribute exists) a class attribute. The LHS target "a.x" '
170-
'is always\n'
171-
' set as an instance attribute, creating it if necessary. '
172-
'Thus, the\n'
173-
' two occurrences of "a.x" do not necessarily refer to the '
174-
'same\n'
175-
' attribute: if the RHS expression refers to a class '
176-
'attribute, the\n'
177-
' LHS creates a new instance attribute as the target of the\n'
178-
' assignment:\n'
165+
' occurs on both sides of the assignment operator, the '
166+
'right-hand side\n'
167+
' expression, "a.x" can access either an instance attribute or '
168+
'(if no\n'
169+
' instance attribute exists) a class attribute. The left-hand '
170+
'side\n'
171+
' target "a.x" is always set as an instance attribute, '
172+
'creating it if\n'
173+
' necessary. Thus, the two occurrences of "a.x" do not '
174+
'necessarily\n'
175+
' refer to the same attribute: if the right-hand side '
176+
'expression\n'
177+
' refers to a class attribute, the left-hand side creates a '
178+
'new\n'
179+
' instance attribute as the target of the assignment:\n'
179180
'\n'
180181
' class Cls:\n'
181182
' x = 3 # class variable\n'
@@ -3302,11 +3303,11 @@
33023303
'"str.format()"\n'
33033304
' method, to produce a “formatted” string representation '
33043305
'of an\n'
3305-
' object. The "format_spec" argument is a string that '
3306+
' object. The *format_spec* argument is a string that '
33063307
'contains a\n'
33073308
' description of the formatting options desired. The '
33083309
'interpretation\n'
3309-
' of the "format_spec" argument is up to the type '
3310+
' of the *format_spec* argument is up to the type '
33103311
'implementing\n'
33113312
' "__format__()", however most classes will either '
33123313
'delegate\n'
@@ -6189,8 +6190,8 @@
61896190
'end up importing "pkg.mod". If you execute "from ..subpkg2 import '
61906191
'mod"\n'
61916192
'from within "pkg.subpkg1" you will import "pkg.subpkg2.mod". The\n'
6192-
'specification for relative imports is contained within **PEP '
6193-
'328**.\n'
6193+
'specification for relative imports is contained in the Package\n'
6194+
'Relative Imports section.\n'
61946195
'\n'
61956196
'"importlib.import_module()" is provided to support applications '
61966197
'that\n'
@@ -8002,11 +8003,11 @@
80028003
'"str.format()"\n'
80038004
' method, to produce a “formatted” string representation of '
80048005
'an\n'
8005-
' object. The "format_spec" argument is a string that '
8006+
' object. The *format_spec* argument is a string that '
80068007
'contains a\n'
80078008
' description of the formatting options desired. The '
80088009
'interpretation\n'
8009-
' of the "format_spec" argument is up to the type '
8010+
' of the *format_spec* argument is up to the type '
80108011
'implementing\n'
80118012
' "__format__()", however most classes will either '
80128013
'delegate\n'
@@ -8768,15 +8769,15 @@
87688769
'When a class definition is executed, the following steps '
87698770
'occur:\n'
87708771
'\n'
8771-
'* MRO entries are resolved\n'
8772+
'* MRO entries are resolved;\n'
87728773
'\n'
8773-
'* the appropriate metaclass is determined\n'
8774+
'* the appropriate metaclass is determined;\n'
87748775
'\n'
8775-
'* the class namespace is prepared\n'
8776+
'* the class namespace is prepared;\n'
87768777
'\n'
8777-
'* the class body is executed\n'
8778+
'* the class body is executed;\n'
87788779
'\n'
8779-
'* the class object is created\n'
8780+
'* the class object is created.\n'
87808781
'\n'
87818782
'\n'
87828783
'Resolving MRO entries\n'
@@ -8806,16 +8807,16 @@
88068807
'\n'
88078808
'* if no bases and no explicit metaclass are given, then '
88088809
'"type()" is\n'
8809-
' used\n'
8810+
' used;\n'
88108811
'\n'
88118812
'* if an explicit metaclass is given and it is *not* an '
88128813
'instance of\n'
8813-
' "type()", then it is used directly as the metaclass\n'
8814+
' "type()", then it is used directly as the metaclass;\n'
88148815
'\n'
88158816
'* if an instance of "type()" is given as the explicit '
88168817
'metaclass, or\n'
88178818
' bases are defined, then the most derived metaclass is '
8818-
'used\n'
8819+
'used.\n'
88198820
'\n'
88208821
'The most derived metaclass is selected from the explicitly '
88218822
'specified\n'
@@ -8931,7 +8932,7 @@
89318932
'with the\n'
89328933
' class being defined and the assigned name of that '
89338934
'particular\n'
8934-
' descriptor; and\n'
8935+
' descriptor;\n'
89358936
'\n'
89368937
'* finally, the "__init_subclass__()" hook is called on the '
89378938
'immediate\n'
@@ -9030,7 +9031,7 @@
90309031
'\n'
90319032
'One can implement the generic class syntax as specified by '
90329033
'**PEP 484**\n'
9033-
'(for example "List[int]") by defining a special method\n'
9034+
'(for example "List[int]") by defining a special method:\n'
90349035
'\n'
90359036
'classmethod object.__class_getitem__(cls, key)\n'
90369037
'\n'
@@ -9672,6 +9673,14 @@
96729673
'capitalized\n'
96739674
' and the rest lowercased.\n'
96749675
'\n'
9676+
' Changed in version 3.8: The first character is now put '
9677+
'into\n'
9678+
' titlecase rather than uppercase. This means that '
9679+
'characters like\n'
9680+
' digraphs will only have their first letter capitalized, '
9681+
'instead of\n'
9682+
' the full character.\n'
9683+
'\n'
96759684
'str.casefold()\n'
96769685
'\n'
96779686
' Return a casefolded copy of the string. Casefolded '
@@ -10416,9 +10425,7 @@
1041610425
' >>> def titlecase(s):\n'
1041710426
' ... return re.sub(r"[A-Za-z]+(\'[A-Za-z]+)?",\n'
1041810427
' ... lambda mo: '
10419-
'mo.group(0)[0].upper() +\n'
10420-
' ... '
10421-
'mo.group(0)[1:].lower(),\n'
10428+
'mo.group(0).capitalize(),\n'
1042210429
' ... s)\n'
1042310430
' ...\n'
1042410431
' >>> titlecase("they\'re bill\'s friends.")\n'
@@ -11286,17 +11293,17 @@
1128611293
'| |\n'
1128711294
' | | unavailable; not inherited by '
1128811295
'| |\n'
11289-
' | | subclasses '
11296+
' | | subclasses. '
1129011297
'| |\n'
1129111298
' '
1129211299
'+---------------------------+---------------------------------+-------------+\n'
11293-
' | "__name__" | The function’s name '
11300+
' | "__name__" | The function’s name. '
1129411301
'| Writable |\n'
1129511302
' '
1129611303
'+---------------------------+---------------------------------+-------------+\n'
11297-
' | "__qualname__" | The function’s *qualified name* '
11304+
' | "__qualname__" | The function’s *qualified '
1129811305
'| Writable |\n'
11299-
' | | New in version 3.3. '
11306+
' | | name*. New in version 3.3. '
1130011307
'| |\n'
1130111308
' '
1130211309
'+---------------------------+---------------------------------+-------------+\n'
@@ -11316,7 +11323,7 @@
1131611323
'| |\n'
1131711324
' | | or "None" if no arguments have '
1131811325
'| |\n'
11319-
' | | a default value '
11326+
' | | a default value. '
1132011327
'| |\n'
1132111328
' '
1132211329
'+---------------------------+---------------------------------+-------------+\n'
@@ -12172,7 +12179,13 @@
1217212179
'\n'
1217312180
' "fromkeys()" is a class method that returns a new '
1217412181
'dictionary.\n'
12175-
' *value* defaults to "None".\n'
12182+
' *value* defaults to "None". All of the values refer '
12183+
'to just a\n'
12184+
' single instance, so it generally doesn’t make sense '
12185+
'for *value*\n'
12186+
' to be a mutable object such as an empty list. To get '
12187+
'distinct\n'
12188+
' values, use a dict comprehension instead.\n'
1217612189
'\n'
1217712190
' get(key[, default])\n'
1217812191
'\n'

0 commit comments

Comments
 (0)
0