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

Comparing between disparate types should raise a Py3K warning #46595

Closed
brettcannon opened this issue Mar 17, 2008 · 5 comments
Closed

Comparing between disparate types should raise a Py3K warning #46595

brettcannon opened this issue Mar 17, 2008 · 5 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@brettcannon
Copy link
Member

BPO 2342
Nosy @brettcannon, @rhettinger
Files
  • object_compare.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 2008-03-18.17:27:04.010>
    created_at = <Date 2008-03-17.18:12:54.742>
    labels = ['interpreter-core']
    title = 'Comparing between disparate types should raise a Py3K warning'
    updated_at = <Date 2008-03-18.17:27:04.008>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2008-03-18.17:27:04.008>
    actor = 'bethard'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-03-18.17:27:04.010>
    closer = 'bethard'
    components = ['Interpreter Core']
    creation = <Date 2008-03-17.18:12:54.742>
    creator = 'brett.cannon'
    dependencies = []
    files = ['9712']
    hgrepos = []
    issue_num = 2342
    keywords = ['patch', '26backport']
    message_count = 5.0
    messages = ['63702', '63734', '63757', '63834', '63947']
    nosy_count = 3.0
    nosy_names = ['brett.cannon', 'rhettinger', 'bethard']
    pr_nums = []
    priority = 'critical'
    resolution = None
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue2342'
    versions = ['Python 2.6']

    @brettcannon
    Copy link
    Member Author

    When you compare disparate types through something other than == and !=
    a Py3K warning should be raised.

    @brettcannon brettcannon added release-blocker interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Mar 17, 2008
    @bethard
    Copy link
    Mannequin

    bethard mannequin commented Mar 17, 2008

    I'll start looking at this.

    @rhettinger
    Copy link
    Contributor

    Can the be done without making comparisons more expensive across the
    board. It will be bad news for Py2.6 if every single comparison gets
    slowed down.

    @bethard
    Copy link
    Mannequin

    bethard mannequin commented Mar 18, 2008

    The code is only invoked when NotImplemented is produced. Take a look at
    the attached patch to try_3way_to_rich_compare and see if you think it's
    going to be too expensive.

    @bethard
    Copy link
    Mannequin

    bethard mannequin commented Mar 18, 2008

    Resolved in revision 61529.

    @bethard bethard mannequin closed this as completed Mar 18, 2008
    @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
    interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants