This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: __base__ undocumented
Type: enhancement Stage:
Components: Documentation Versions: Python 3.4, Python 3.5, Python 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Arfrever, anupama.srinivas.murthy, docs@python, gvanrossum, rhettinger
Priority: normal Keywords: easy, patch

Created on 2014-09-21 22:54 by Arfrever, last changed 2022-04-11 14:58 by admin.

File name Uploaded Description Edit
function-documentation.patch anupama.srinivas.murthy, 2014-09-30 12:59 Patch containing documentation of __base__ review
Messages (5)
msg227241 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2014-09-21 22:54
__bases__ is documented, but __base__ is not.

$ grep -r __base__ Doc
$ grep -r __bases__ Doc
Doc/c-api/object.rst:are different objects, *B*'s :attr:`~class.__bases__` attribute is searched in
Doc/c-api/object.rst:a depth-first fashion for *A* --- the presence of the :attr:`~class.__bases__`
Doc/extending/newtypes.rst:   in its :attr:`~class.__bases__`, or else it will not be able to call your type's
Doc/library/email.headerregistry.rst:    class's ``__bases__`` list.
Doc/library/functions.rst:   tuple itemizes the base classes and becomes the :attr:`~class.__bases__`
Doc/library/stdtypes.rst:.. attribute:: class.__bases__
Doc/reference/datamodel.rst:      single: __bases__ (class attribute)
Doc/reference/datamodel.rst:   dictionary containing the class's namespace; :attr:`~class.__bases__` is a
Doc/whatsnew/2.3.rst:  removed: you can now assign to the :attr:`__name__` and :attr:`__bases__`
Doc/whatsnew/2.3.rst:  assigned to :attr:`__bases__` along the lines of those relating to assigning to
msg227242 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2014-09-21 23:46
I think that __base__ was intended to be a non-guaranteed implementation detail for new-style classes just like  __dictoffset__ and __flags__ .
msg227243 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2014-09-22 00:07
Raymond is correct. __base__ is closely tied to the C implementation.  I think it might be worth a mention, but with an explicit note that it is CPython-specific.  It is sometimes useful, e.g. when wondering why a certain case of multiple inheritance is rejected.
msg227245 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2014-09-22 00:13
__base__ exists also in Jython and PyPy.
msg227903 - (view) Author: anupama srinivas murthy (anupama.srinivas.murthy) * Date: 2014-09-30 12:59
I have documented the function in object.rst file. I do not know the use of the function and have not mentioned that. My documentation is based on what I understood from the comments below and the explanation here:
Date User Action Args
2022-04-11 14:58:08adminsetgithub: 66646
2015-08-31 04:54:43martin.panterlinkissue23639 dependencies
2014-09-30 12:59:10anupama.srinivas.murthysetfiles: + function-documentation.patch

nosy: + anupama.srinivas.murthy
messages: + msg227903

keywords: + patch
2014-09-22 00:13:38Arfreversetmessages: + msg227245
2014-09-22 00:07:09gvanrossumsetmessages: + msg227243
2014-09-21 23:46:13rhettingersetnosy: + gvanrossum, rhettinger
messages: + msg227242
2014-09-21 22:54:27Arfrevercreate