Issue 29012: bases is a tuple (possibly empty or a singleton) (original ) (raw )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 .
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) *
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)
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) *
Date: 2017-01-02 02:59
Thanks, Jim.
msg284470 - (view)
Author: Serhiy Storchaka (serhiy.storchaka) *
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)
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) *
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:40
admin
set
github: 73198
2017-01-03 00:35:28
berker.peksag
set
messages: +
2017-01-03 00:33:51
python-dev
set
messages: +
2017-01-02 22:33:14
Jim Fasarakis-Hilliard
set
files: + fixbasesdoc2.patch messages: +
2017-01-02 06:27:24
serhiy.storchaka
set
nosy: + serhiy.storchaka messages: +
2017-01-02 02:59:48
berker.peksag
set
status: open -> closedtype: behaviorversions: - Python 3.3, Python 3.4nosy: + berker.peksag messages: + resolution: fixedstage: resolved
2017-01-02 02:59:05
python-dev
set
nosy: + python-dev messages: +
2016-12-19 12:04:07
r.david.murray
set
nosy: + r.david.murray messages: +
2016-12-19 08:00:07
Jim Fasarakis-Hilliard
create