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: include the "object" type in the lists of documented types
Type: enhancement Stage: patch review
Components: Documentation Versions: Python 3.6, Python 3.4, Python 3.5
Status: open Resolution:
Dependencies: Superseder:
Assigned To: chris.jerdonek Nosy List: chris.jerdonek, docs@python, eric.araujo, ezio.melotti, georg.brandl, martin.panter, mvolz, r.david.murray, terry.reedy
Priority: normal Keywords: patch

Created on 2012-11-19 00:14 by chris.jerdonek, last changed 2022-04-11 14:57 by admin.

File name Uploaded Description Edit
object-type.patch martin.panter, 2015-07-30 12:43 review
Messages (6)
msg175938 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-11-19 00:14
This issue is to add the "object" type to the list of types documented in the language reference's standard type hierarchy and the library reference's list of built-in types:

The constructor is documented here:

In the documentation, it might also be worth stating explicitly which of the special methods the object type defines:

For example, object.__str__ is defined, but object.__bytes__ is not.  By doing this, users will know which special methods user-defined classes will automatically inherit.
msg176235 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012-11-23 20:11
good idea
msg213058 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014-03-10 18:26
I think there was another issue discussing a separation between object.__str__ and someobject.__bytes__, to make it clear which are existing methods of the object class and which are methods that one may implement in their classes.
msg213267 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-03-12 15:54
Doing this is going to be a bit tricky, since currently links like :meth:`object.__format__` go to the special methods section.  So I think making the distinction between available special methods and ones that object implements will need to be done at the same time as this, and there may be quite a few places in the documentation where reference will need to be changed.
msg213335 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-03-12 23:45
What does not help is that help(ob) omits all the methods inherited from object, *even when ob is object*.  See #20285.
msg247663 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-07-30 12:43
Here is a patch. Perhaps it is what you had in mind. I added quick mentions of the “object” class to The Standard Type Hierarchy and Other Built-in Types. I added documentation of what the object class’s own implementations do where it provides them. I added sentences pointing out that other methods are not provided by the object class, where I thought it may not already be clear. I also added a test case to check that various methods exist or not, to match the documentation.
Date User Action Args
2022-04-11 14:57:38adminsetgithub: 60712
2015-07-30 12:43:07martin.pantersetfiles: + object-type.patch

versions: + Python 3.5, Python 3.6, - Python 3.3
keywords: + patch
nosy: + martin.panter

messages: + msg247663
stage: needs patch -> patch review
2015-07-21 08:05:49ethan.furmansetnosy: - ethan.furman
2014-03-12 23:45:24terry.reedysetmessages: + msg213335
versions: - Python 3.2
2014-03-12 15:54:26r.david.murraysetnosy: + r.david.murray
messages: + msg213267
2014-03-10 18:26:10eric.araujosetmessages: + msg213058
2014-03-09 23:33:43mvolzsetnosy: + mvolz
2014-01-11 23:23:32ethan.furmansetnosy: + ethan.furman
2012-11-23 20:11:17terry.reedysetnosy: + terry.reedy
messages: + msg176235
2012-11-23 17:16:43ezio.melottisetstage: needs patch
2012-11-20 07:39:47chris.jerdoneksetassignee: docs@python -> chris.jerdonek
2012-11-19 00:14:41chris.jerdonekcreate