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.

classification
Title: __bases__ is a tuple (possibly empty or a singleton)
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Jim Fasarakis-Hilliard, berker.peksag, docs@python, python-dev, r.david.murray, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2016-12-19 08:00 by Jim Fasarakis-Hilliard, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fixbasesdoc.patch Jim Fasarakis-Hilliard, 2016-12-19 08:00 review
fixbasesdoc2.patch Jim Fasarakis-Hilliard, 2017-01-02 22:33 review
Messages (8)
msg283595 - (view) Author: Jim Fasarakis-Hilliard (Jim Fasarakis-Hilliard) * Date: 2016-12-19 08:00
The following statement is in the Language Reference for Custom classes:

>  __bases__ is a tuple (possibly empty or a singleton) containing the base classes

AFAIK, ``object.__bases__`` is the only object for which ``__bases__`` is empty and it isn't a *custom* class. Attempts to create a class and assign __bases__ to an empty tuple is checked to enforce inheritance from ``object``. This *seems* to be something that slipped through when the docs were created for Python 3.0?

I'm curious to see if this can actually be empty, if not, attached patch removes ''empty'' from the sentence.
msg283609 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-12-19 12:04
Most likely it just slipped through.  In 2.7 the section is just called 'classes', not 'custom classes', and covered both classic classes and the new style classes that are all that python3 has.
msg284446 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2017-01-02 02:59
New changeset 721df314d45a by Berker Peksag in branch '3.5':
Issue #29012: Remove outdated information about __bases__
https://hg.python.org/cpython/rev/721df314d45a

New changeset 019125fb6d66 by Berker Peksag in branch '3.6':
Issue #29012: Merge from 3.5
https://hg.python.org/cpython/rev/019125fb6d66

New changeset 454426dbff83 by Berker Peksag in branch 'default':
Issue #29012: Merge from 3.6
https://hg.python.org/cpython/rev/454426dbff83
msg284447 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-01-02 02:59
Thanks, Jim.
msg284470 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-01-02 06:27
I think "possible a singleton" can be removed too. It doesn't add any useful information, any tuple is possible a singleton.
msg284510 - (view) Author: Jim Fasarakis-Hilliard (Jim Fasarakis-Hilliard) * Date: 2017-01-02 22:33
Yes, I agree with that it seems redundant after the change. I'm attaching another small patch based on the committed one to trim that off.
msg284512 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2017-01-03 00:33
New changeset 1aba7cbbcc27 by Berker Peksag in branch '3.5':
Issue #29012: Remove another outdated information
https://hg.python.org/cpython/rev/1aba7cbbcc27

New changeset 7ef5b02b228a by Berker Peksag in branch '3.6':
Issue #29012: Merge from 3.5
https://hg.python.org/cpython/rev/7ef5b02b228a

New changeset f05165a9cae6 by Berker Peksag in branch 'default':
Issue #29012: Merge from 3.6
https://hg.python.org/cpython/rev/f05165a9cae6
msg284513 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-01-03 00:35
Good point, Serhiy. Thanks for the patch, Jim. I've now removed the "possible a singleton" part.
History
Date User Action Args
2022-04-11 14:58:40adminsetgithub: 73198
2017-01-03 00:35:28berker.peksagsetmessages: + msg284513
2017-01-03 00:33:51python-devsetmessages: + msg284512
2017-01-02 22:33:14Jim Fasarakis-Hilliardsetfiles: + fixbasesdoc2.patch

messages: + msg284510
2017-01-02 06:27:24serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg284470
2017-01-02 02:59:48berker.peksagsetstatus: open -> closed

type: behavior
versions: - Python 3.3, Python 3.4
nosy: + berker.peksag

messages: + msg284447
resolution: fixed
stage: resolved
2017-01-02 02:59:05python-devsetnosy: + python-dev
messages: + msg284446
2016-12-19 12:04:07r.david.murraysetnosy: + r.david.murray
messages: + msg283609
2016-12-19 08:00:07Jim Fasarakis-Hilliardcreate