Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ee454a0

Browse files
committed
Merge from releasing branch
2 parents 0e6d0dc + ac7974f commit ee454a0

5 files changed

Lines changed: 122 additions & 31 deletions

File tree

.hgtags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,4 @@ cc15d736d860303b9da90d43cd32db39bab048df v3.5.0rc2
169169
5896da372fb044e38595fb74495de1e1e7c8fb3c v3.6.0a1
170170
37889342355223e2fc1438de3dc7ffcd625c60f7 v3.6.0a2
171171
f3edf13dc339b8942ae6b309771ab197dd8ce6fa v3.6.0a3
172+
017cf260936b444788c9b671d195b7bfd83dbd25 v3.6.0a4

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 6
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.6.0a3+"
26+
#define PY_VERSION "3.6.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: 105 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Autogenerated by Sphinx on Mon Jul 11 15:30:24 2016
2+
# Autogenerated by Sphinx on Mon Aug 15 16:11:20 2016
33
topics = {'assert': '\n'
44
'The "assert" statement\n'
55
'**********************\n'
@@ -569,6 +569,14 @@
569569
'*instance* of the\n'
570570
' owner class.\n'
571571
'\n'
572+
'object.__set_name__(self, owner, name)\n'
573+
'\n'
574+
' Called at the time the owning class *owner* is '
575+
'created. The\n'
576+
' descriptor has been assigned to *name*.\n'
577+
'\n'
578+
' New in version 3.6.\n'
579+
'\n'
572580
'The attribute "__objclass__" is interpreted by the '
573581
'"inspect" module as\n'
574582
'specifying the class where this object was defined '
@@ -1338,13 +1346,12 @@
13381346
'\n'
13391347
'A class definition is an executable statement. The inheritance '
13401348
'list\n'
1341-
'usually gives a list of base classes (see Customizing class '
1342-
'creation\n'
1343-
'for more advanced uses), so each item in the list should evaluate '
1344-
'to a\n'
1345-
'class object which allows subclassing. Classes without an '
1346-
'inheritance\n'
1347-
'list inherit, by default, from the base class "object"; hence,\n'
1349+
'usually gives a list of base classes (see Metaclasses for more\n'
1350+
'advanced uses), so each item in the list should evaluate to a '
1351+
'class\n'
1352+
'object which allows subclassing. Classes without an inheritance '
1353+
'list\n'
1354+
'inherit, by default, from the base class "object"; hence,\n'
13481355
'\n'
13491356
' class Foo:\n'
13501357
' pass\n'
@@ -1377,16 +1384,14 @@
13771384
' @f2\n'
13781385
' class Foo: pass\n'
13791386
'\n'
1380-
'is equivalent to\n'
1387+
'is roughly equivalent to\n'
13811388
'\n'
13821389
' class Foo: pass\n'
13831390
' Foo = f1(arg)(f2(Foo))\n'
13841391
'\n'
13851392
'The evaluation rules for the decorator expressions are the same as '
13861393
'for\n'
1387-
'function decorators. The result must be a class object, which is '
1388-
'then\n'
1389-
'bound to the class name.\n'
1394+
'function decorators. The result is then bound to the class name.\n'
13901395
'\n'
13911396
"**Programmer's note:** Variables defined in the class definition "
13921397
'are\n'
@@ -2312,11 +2317,15 @@
23122317
' @f2\n'
23132318
' def func(): pass\n'
23142319
'\n'
2315-
'is equivalent to\n'
2320+
'is roughly equivalent to\n'
23162321
'\n'
23172322
' def func(): pass\n'
23182323
' func = f1(arg)(f2(func))\n'
23192324
'\n'
2325+
'except that the original function is not temporarily bound to '
2326+
'the name\n'
2327+
'"func".\n'
2328+
'\n'
23202329
'When one or more *parameters* have the form *parameter* "="\n'
23212330
'*expression*, the function is said to have "default parameter '
23222331
'values."\n'
@@ -2440,13 +2449,12 @@
24402449
'\n'
24412450
'A class definition is an executable statement. The inheritance '
24422451
'list\n'
2443-
'usually gives a list of base classes (see Customizing class '
2444-
'creation\n'
2445-
'for more advanced uses), so each item in the list should '
2446-
'evaluate to a\n'
2447-
'class object which allows subclassing. Classes without an '
2448-
'inheritance\n'
2449-
'list inherit, by default, from the base class "object"; hence,\n'
2452+
'usually gives a list of base classes (see Metaclasses for more\n'
2453+
'advanced uses), so each item in the list should evaluate to a '
2454+
'class\n'
2455+
'object which allows subclassing. Classes without an inheritance '
2456+
'list\n'
2457+
'inherit, by default, from the base class "object"; hence,\n'
24502458
'\n'
24512459
' class Foo:\n'
24522460
' pass\n'
@@ -2482,16 +2490,15 @@
24822490
' @f2\n'
24832491
' class Foo: pass\n'
24842492
'\n'
2485-
'is equivalent to\n'
2493+
'is roughly equivalent to\n'
24862494
'\n'
24872495
' class Foo: pass\n'
24882496
' Foo = f1(arg)(f2(Foo))\n'
24892497
'\n'
24902498
'The evaluation rules for the decorator expressions are the same '
24912499
'as for\n'
2492-
'function decorators. The result must be a class object, which '
2493-
'is then\n'
2494-
'bound to the class name.\n'
2500+
'function decorators. The result is then bound to the class '
2501+
'name.\n'
24952502
'\n'
24962503
"**Programmer's note:** Variables defined in the class definition "
24972504
'are\n'
@@ -3776,7 +3783,7 @@
37763783
'\n'
37773784
'interact\n'
37783785
'\n'
3779-
' Start an interative interpreter (using the "code" module) '
3786+
' Start an interactive interpreter (using the "code" module) '
37803787
'whose\n'
37813788
' global namespace contains all the (global and local) names '
37823789
'found in\n'
@@ -5296,11 +5303,15 @@
52965303
' @f2\n'
52975304
' def func(): pass\n'
52985305
'\n'
5299-
'is equivalent to\n'
5306+
'is roughly equivalent to\n'
53005307
'\n'
53015308
' def func(): pass\n'
53025309
' func = f1(arg)(f2(func))\n'
53035310
'\n'
5311+
'except that the original function is not temporarily bound to '
5312+
'the name\n'
5313+
'"func".\n'
5314+
'\n'
53045315
'When one or more *parameters* have the form *parameter* "="\n'
53055316
'*expression*, the function is said to have "default parameter '
53065317
'values."\n'
@@ -6032,7 +6043,7 @@
60326043
'expression"\n'
60336044
'yields a function object. The unnamed object behaves like a '
60346045
'function\n'
6035-
'object defined with\n'
6046+
'object defined with:\n'
60366047
'\n'
60376048
' def <lambda>(arguments):\n'
60386049
' return expression\n'
@@ -7964,6 +7975,14 @@
79647975
'of the\n'
79657976
' owner class.\n'
79667977
'\n'
7978+
'object.__set_name__(self, owner, name)\n'
7979+
'\n'
7980+
' Called at the time the owning class *owner* is created. '
7981+
'The\n'
7982+
' descriptor has been assigned to *name*.\n'
7983+
'\n'
7984+
' New in version 3.6.\n'
7985+
'\n'
79677986
'The attribute "__objclass__" is interpreted by the "inspect" '
79687987
'module as\n'
79697988
'specifying the class where this object was defined (setting '
@@ -8188,6 +8207,65 @@
81888207
'Customizing class creation\n'
81898208
'==========================\n'
81908209
'\n'
8210+
'Whenever a class inherits from another class, '
8211+
'*__init_subclass__* is\n'
8212+
'called on that class. This way, it is possible to write '
8213+
'classes which\n'
8214+
'change the behavior of subclasses. This is closely related '
8215+
'to class\n'
8216+
'decorators, but where class decorators only affect the '
8217+
'specific class\n'
8218+
'they\'re applied to, "__init_subclass__" solely applies to '
8219+
'future\n'
8220+
'subclasses of the class defining the method.\n'
8221+
'\n'
8222+
'classmethod object.__init_subclass__(cls)\n'
8223+
'\n'
8224+
' This method is called whenever the containing class is '
8225+
'subclassed.\n'
8226+
' *cls* is then the new subclass. If defined as a normal '
8227+
'instance\n'
8228+
' method, this method is implicitly converted to a class '
8229+
'method.\n'
8230+
'\n'
8231+
' Keyword arguments which are given to a new class are '
8232+
'passed to the\n'
8233+
' parent\'s class "__init_subclass__". For compatibility '
8234+
'with other\n'
8235+
' classes using "__init_subclass__", one should take out '
8236+
'the needed\n'
8237+
' keyword arguments and pass the others over to the base '
8238+
'class, as\n'
8239+
' in:\n'
8240+
'\n'
8241+
' class Philosopher:\n'
8242+
' def __init_subclass__(cls, default_name, '
8243+
'**kwargs):\n'
8244+
' super().__init_subclass__(**kwargs)\n'
8245+
' cls.default_name = default_name\n'
8246+
'\n'
8247+
' class AustralianPhilosopher(Philosopher, '
8248+
'default_name="Bruce"):\n'
8249+
' pass\n'
8250+
'\n'
8251+
' The default implementation "object.__init_subclass__" '
8252+
'does nothing,\n'
8253+
' but raises an error if it is called with any arguments.\n'
8254+
'\n'
8255+
' Note: The metaclass hint "metaclass" is consumed by the '
8256+
'rest of\n'
8257+
' the type machinery, and is never passed to '
8258+
'"__init_subclass__"\n'
8259+
' implementations. The actual metaclass (rather than the '
8260+
'explicit\n'
8261+
' hint) can be accessed as "type(cls)".\n'
8262+
'\n'
8263+
' New in version 3.6.\n'
8264+
'\n'
8265+
'\n'
8266+
'Metaclasses\n'
8267+
'-----------\n'
8268+
'\n'
81918269
'By default, classes are constructed using "type()". The '
81928270
'class body is\n'
81938271
'executed in a new namespace and the class name is bound '

Misc/NEWS

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
Python News
33
+++++++++++
44

5+
What's New in Python 3.6.0 beta 1
6+
=================================
7+
8+
*Release date: XXXX-XX-XX*
9+
10+
Core and Builtins
11+
-----------------
12+
13+
Library
14+
-------
15+
16+
517
What's New in Python 3.6.0 alpha 4
618
==================================
719

8-
*Release date: XXXX-XX-XX*
20+
*Release date: 2016-08-15*
921

1022
Core and Builtins
1123
-----------------

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This is Python version 3.6.0 alpha 3
1+
This is Python version 3.6.0 alpha 4
22
====================================
33

44
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,

0 commit comments

Comments
 (0)