-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Object protocol #3306
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
Object protocol #3306
Conversation
db9f1ed
to
497fb98
Compare
vm/src/types/slot.rs
Outdated
fn __hash__(zelf: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyHash> { | ||
Self::slot_hash(&zelf, vm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intended to include in this PR, not in #3308 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
He'll probably just rebase those changes here now that they've been merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The below Unhashable
changes require this. Will moving them into #3308 be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes more sense to move it over to #3308
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes more sense to move it over to #3308
Sorry for late 😢. I also agree with him
yup, I think that's a good idea. After this pr there will be two ways to do the same thing. As I see it, these operations act on objects so they should be exposed through there and not through |
497fb98
to
79e951b
Compare
should |
Probably. I doub't we really need that trait now. I think relocating |
The |
@DimitrisJim could you review it? I want to open issue for relocating functino bodies and refactoring around them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I had reviewed but this does lgtm.
I also suggest to replace the paired vm methods and use PyObjectRef methods
ref #3244