Skip to content

Convert objobject.rs to new args style #756

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

Merged
merged 1 commit into from
Mar 28, 2019

Conversation

adrian17
Copy link
Contributor

No description provided.

required = [(_zelf, Some(vm.ctx.object())), (_other, None)]
);
Ok(vm.ctx.not_implemented())
fn object_eq(_zelf: PyObjectRef, _other: PyObjectRef, vm: &VirtualMachine) -> PyObjectRef {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a comment on this PR, but I realized I was wrong when I changed this to return NotImplemented, since it looks like cpython does implement this by comparing object ids:

>>> object.__eq__(2, 2)
True

@OddCoincidence OddCoincidence merged commit e048037 into RustPython:master Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants