-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add complex.{__abs__, __eq__, __neg__} #410
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
Conversation
17fc07b
to
520f71f
Compare
Can we test these using idiomatic python rather than calling the magic methods directly: Eg:
etc? |
@cthulahoops I agree, this is cleaner testcode. It will invoke the magic method at some point in time. |
@@ -130,6 +130,7 @@ pub struct PyContext { | |||
pub map_type: PyObjectRef, | |||
pub memoryview_type: PyObjectRef, | |||
pub none: PyObjectRef, | |||
pub not_implemented: PyObjectRef, |
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.
Wow, I cannot be believe we did not implement this yet ;)
Thanks to @cthulahoops's suggestion, I think I found a subtle bug in the way the binary magic methods currently are implemented. Filed as #419. I will work around it here, and fix this in another PR. |
Looks ready to merge, but has conflicts to resolve. |
I resolved the conflict. |
The former required the addition of the
NotImplemented
constant to match cpython`s behavior.