Navigation Menu

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

Clarify built-in types comparisons #78733

Closed
Windsooon mannequin opened this issue Aug 31, 2018 · 4 comments
Closed

Clarify built-in types comparisons #78733

Windsooon mannequin opened this issue Aug 31, 2018 · 4 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@Windsooon
Copy link
Mannequin

Windsooon mannequin commented Aug 31, 2018

BPO 34552
Nosy @gvanrossum, @njsmith, @zware, @miss-islington, @Windsooon, @iritkatriel
PRs
  • bpo-34552: Clarify built-in types comparisons #9035
  • 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 2020-10-08.22:06:03.693>
    created_at = <Date 2018-08-31.05:37:52.432>
    labels = ['3.8', 'type-feature', '3.7', 'docs']
    title = 'Clarify built-in types comparisons'
    updated_at = <Date 2020-10-08.22:06:03.693>
    user = 'https://github.com/Windsooon'

    bugs.python.org fields:

    activity = <Date 2020-10-08.22:06:03.693>
    actor = 'gvanrossum'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2020-10-08.22:06:03.693>
    closer = 'gvanrossum'
    components = ['Documentation']
    creation = <Date 2018-08-31.05:37:52.432>
    creator = 'Windson Yang'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34552
    keywords = ['patch']
    message_count = 4.0
    messages = ['324403', '325324', '378287', '378289']
    nosy_count = 7.0
    nosy_names = ['gvanrossum', 'njs', 'docs@python', 'zach.ware', 'miss-islington', 'Windson Yang', 'iritkatriel']
    pr_nums = ['9035']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue34552'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5', 'Python 3.6', 'Python 3.7', 'Python 3.8']

    @Windsooon
    Copy link
    Mannequin Author

    Windsooon mannequin commented Aug 31, 2018

    In https://docs.python.org/3.5/library/stdtypes.html#comparisons

    "some types (for example, function objects) support only a degenerate notion of comparison where any two objects of that type are unequal."

    We had some discussion at zulipchat already:

    "more seriously: I think we can just delete that sentence. The next sentence makes clear that < and friends arne't always defined, and the sentence after that notes that == defaults to is if there's nothing better." - by Nathaniel J. Smith

    IMO, I think we should also clarify the relationship between "==", "is" and "__eq__".

    @Windsooon Windsooon mannequin added 3.7 (EOL) end of life 3.8 only security fixes labels Aug 31, 2018
    @Windsooon Windsooon mannequin assigned docspython Aug 31, 2018
    @Windsooon Windsooon mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Aug 31, 2018
    @miss-islington
    Copy link
    Contributor

    New changeset 1aeba74 by Miss Islington (bot) (Windson yang) in branch 'master':
    bpo-34552: Clarify built-in types comparisons (GH-9035)
    1aeba74

    @iritkatriel
    Copy link
    Member

    This seems complete, can it be closed?

    @gvanrossum
    Copy link
    Member

    Yup. Thanks for catching this!

    @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 3.8 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants