Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__bases__ is a tuple (possibly empty or a singleton) #73198

Closed
DimitrisJim mannequin opened this issue Dec 19, 2016 · 8 comments
Closed

__bases__ is a tuple (possibly empty or a singleton) #73198

DimitrisJim mannequin opened this issue Dec 19, 2016 · 8 comments
Labels
3.7 (EOL) end of life docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@DimitrisJim
Copy link
Mannequin

DimitrisJim mannequin commented Dec 19, 2016

BPO 29012
Nosy @bitdancer, @berkerpeksag, @serhiy-storchaka, @DimitrisJim
Files
  • fixbasesdoc.patch
  • fixbasesdoc2.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-01-02.02:59:48.874>
    created_at = <Date 2016-12-19.08:00:07.600>
    labels = ['type-bug', '3.7', 'docs']
    title = '__bases__ is a tuple (possibly empty or a singleton)'
    updated_at = <Date 2017-01-03.00:35:28.886>
    user = 'https://github.com/DimitrisJim'

    bugs.python.org fields:

    activity = <Date 2017-01-03.00:35:28.886>
    actor = 'berker.peksag'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2017-01-02.02:59:48.874>
    closer = 'berker.peksag'
    components = ['Documentation']
    creation = <Date 2016-12-19.08:00:07.600>
    creator = 'Jim Fasarakis-Hilliard'
    dependencies = []
    files = ['45962', '46117']
    hgrepos = []
    issue_num = 29012
    keywords = ['patch']
    message_count = 8.0
    messages = ['283595', '283609', '284446', '284447', '284470', '284510', '284512', '284513']
    nosy_count = 6.0
    nosy_names = ['r.david.murray', 'docs@python', 'python-dev', 'berker.peksag', 'serhiy.storchaka', 'Jim Fasarakis-Hilliard']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue29012'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

    @DimitrisJim
    Copy link
    Mannequin Author

    DimitrisJim mannequin commented Dec 19, 2016

    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.

    @DimitrisJim DimitrisJim mannequin added the 3.7 (EOL) end of life label Dec 19, 2016
    @DimitrisJim DimitrisJim mannequin assigned docspython Dec 19, 2016
    @DimitrisJim DimitrisJim mannequin added the docs Documentation in the Doc dir label Dec 19, 2016
    @bitdancer
    Copy link
    Member

    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.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 2, 2017

    New changeset 721df314d45a by Berker Peksag in branch '3.5':
    Issue bpo-29012: Remove outdated information about __bases__
    https://hg.python.org/cpython/rev/721df314d45a

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

    New changeset 454426dbff83 by Berker Peksag in branch 'default':
    Issue bpo-29012: Merge from 3.6
    https://hg.python.org/cpython/rev/454426dbff83

    @berkerpeksag
    Copy link
    Member

    Thanks, Jim.

    @berkerpeksag berkerpeksag added the type-bug An unexpected behavior, bug, or error label Jan 2, 2017
    @serhiy-storchaka
    Copy link
    Member

    I think "possible a singleton" can be removed too. It doesn't add any useful information, any tuple is possible a singleton.

    @DimitrisJim
    Copy link
    Mannequin Author

    DimitrisJim mannequin commented Jan 2, 2017

    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.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 3, 2017

    New changeset 1aba7cbbcc27 by Berker Peksag in branch '3.5':
    Issue bpo-29012: Remove another outdated information
    https://hg.python.org/cpython/rev/1aba7cbbcc27

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

    New changeset f05165a9cae6 by Berker Peksag in branch 'default':
    Issue bpo-29012: Merge from 3.6
    https://hg.python.org/cpython/rev/f05165a9cae6

    @berkerpeksag
    Copy link
    Member

    Good point, Serhiy. Thanks for the patch, Jim. I've now removed the "possible a singleton" part.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants