[Python-checkins] cpython (3.6): Update pydoc topics for 3.6.0rc1

ned.deily python-checkins at python.org
Wed Dec 7 02:07:42 EST 2016


https://hg.python.org/cpython/rev/37b9d1c45ea2
changeset:   105495:37b9d1c45ea2
branch:      3.6
parent:      105492:8de7771a0d2a
user:        Ned Deily <nad at python.org>
date:        Tue Dec 06 18:53:16 2016 -0500
summary:
  Update pydoc topics for 3.6.0rc1

files:
  Lib/pydoc_data/topics.py |  41 +++++++++++++++++++++++++--
  1 files changed, 37 insertions(+), 4 deletions(-)


diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py
--- a/Lib/pydoc_data/topics.py
+++ b/Lib/pydoc_data/topics.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Autogenerated by Sphinx on Mon Nov 21 23:22:05 2016
+# Autogenerated by Sphinx on Tue Dec  6 18:51:51 2016
 topics = {'assert': '\n'
            'The "assert" statement\n'
            '**********************\n'
@@ -8503,9 +8503,10 @@
                  'defined at the\n'
                  'class scope. Class variables must be accessed through the '
                  'first\n'
-                 'parameter of instance or class methods, and cannot be '
-                 'accessed at all\n'
-                 'from static methods.\n'
+                 'parameter of instance or class methods, or through the '
+                 'implicit\n'
+                 'lexically scoped "__class__" reference described in the next '
+                 'section.\n'
                  '\n'
                  '\n'
                  'Creating the class object\n'
@@ -8535,6 +8536,38 @@
                  'passed to the\n'
                  'method.\n'
                  '\n'
+                 '**CPython implementation detail:** In CPython 3.6 and later, '
+                 'the\n'
+                 '"__class__" cell is passed to the metaclass as a '
+                 '"__classcell__" entry\n'
+                 'in the class namespace. If present, this must be propagated '
+                 'up to the\n'
+                 '"type.__new__" call in order for the class to be '
+                 'initialised\n'
+                 'correctly. Failing to do so will result in a '
+                 '"DeprecationWarning" in\n'
+                 'Python 3.6, and a "RuntimeWarning" in the future.\n'
+                 '\n'
+                 'When using the default metaclass "type", or any metaclass '
+                 'that\n'
+                 'ultimately calls "type.__new__", the following additional\n'
+                 'customisation steps are invoked after creating the class '
+                 'object:\n'
+                 '\n'
+                 '* first, "type.__new__" collects all of the descriptors in '
+                 'the class\n'
+                 '  namespace that define a "__set_name__()" method;\n'
+                 '\n'
+                 '* second, all of these "__set_name__" methods are called '
+                 'with the\n'
+                 '  class being defined and the assigned name of that '
+                 'particular\n'
+                 '  descriptor; and\n'
+                 '\n'
+                 '* finally, the "__init_subclass__()" hook is called on the '
+                 'immediate\n'
+                 '  parent of the new class in its method resolution order.\n'
+                 '\n'
                  'After the class object is created, it is passed to the '
                  'class\n'
                  'decorators included in the class definition (if any) and the '

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list