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

Python 3 changement of behavior with __ne__: documentation not updated #61353

Closed
franck mannequin opened this issue Feb 7, 2013 · 2 comments
Closed

Python 3 changement of behavior with __ne__: documentation not updated #61353

franck mannequin opened this issue Feb 7, 2013 · 2 comments
Labels
docs Documentation in the Doc dir

Comments

@franck
Copy link
Mannequin

franck mannequin commented Feb 7, 2013

BPO 17151
Nosy @mdickinson
Superseder
  • bpo-4395: Document auto ne generation; provide a use case for non-trivial ne
  • 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 2013-02-07.16:27:09.031>
    created_at = <Date 2013-02-07.15:34:19.227>
    labels = ['docs']
    title = 'Python 3 changement of behavior with __ne__: documentation not updated'
    updated_at = <Date 2013-02-07.16:27:09.029>
    user = 'https://bugs.python.org/franck'

    bugs.python.org fields:

    activity = <Date 2013-02-07.16:27:09.029>
    actor = 'mark.dickinson'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2013-02-07.16:27:09.031>
    closer = 'mark.dickinson'
    components = ['Documentation']
    creation = <Date 2013-02-07.15:34:19.227>
    creator = 'franck'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 17151
    keywords = []
    message_count = 2.0
    messages = ['181620', '181629']
    nosy_count = 3.0
    nosy_names = ['mark.dickinson', 'docs@python', 'franck']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '4395'
    type = None
    url = 'https://bugs.python.org/issue17151'
    versions = ['Python 3.1', 'Python 3.2', 'Python 3.3', 'Python 3.4', 'Python 3.5']

    @franck
    Copy link
    Mannequin Author

    franck mannequin commented Feb 7, 2013

    Hi. As of python 3, behavior of object.__ne__ changed to call (not object.__eq__) if implemented. This changement can be seen in function object_richcompare in file Objects/typeobject.c.

    Documentation didn't change though, still saying[1] that "There are no implied relationships among the comparison operators. [...] Accordingly, when defining __eq__(), one should also define __ne__()".

    Maybe a paragraph about this new behavior would be fine? I am not sure if last sentence of last paragraph is what it means, but it was already there in python 2 doc so guess no. I am not sure about how to write it so no patch, sorry.

    [1] http://docs.python.org/3.3/reference/datamodel.html#object.\_\_eq__

    @franck franck mannequin assigned docspython Feb 7, 2013
    @franck franck mannequin added the docs Documentation in the Doc dir label Feb 7, 2013
    @mdickinson
    Copy link
    Member

    There's a (long-standing) issue already open for this: bpo-4395. I'll close this as a duplicate and add a note to that issue; with any luck, pinging that issue might produce some movement.

    @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
    docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant