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.
Created on 2014年09月21日 22:54 by Arfrever, last changed 2022年04月11日 14:58 by admin.
| Files | ||||
|---|---|---|---|---|
| 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: http://code.activestate.com/lists/python-list/334282/ |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:08 | admin | set | github: 66646 |
| 2015年08月31日 04:54:43 | martin.panter | link | issue23639 dependencies |
| 2014年09月30日 12:59:10 | anupama.srinivas.murthy | set | files:
+ function-documentation.patch nosy: + anupama.srinivas.murthy messages: + msg227903 keywords: + patch |
| 2014年09月22日 00:13:38 | Arfrever | set | messages: + msg227245 |
| 2014年09月22日 00:07:09 | gvanrossum | set | messages: + msg227243 |
| 2014年09月21日 23:46:13 | rhettinger | set | nosy:
+ gvanrossum, rhettinger messages: + msg227242 |
| 2014年09月21日 22:54:27 | Arfrever | create | |