We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
DivModable
Create a trait for the __divmod__ method. In its simplest form, it would look like this in a struct:
__divmod__
fn __divmod__(self: Self, other: Self) -> Tuple[Self, Self]
Each dunder method has its own trait. We should do it for __divmod__ too.
See #2097 (comment)
While trying to implement it, I encountered a blocking error. See the issue #2597 . It might be a compiler bug, or I might misuse traits.
The text was updated successfully, but these errors were encountered:
divmod(Int, Int)
No branches or pull requests
Review Mojo's priorities
What is your request?
Create a trait for the
__divmod__
method. In its simplest form, it would look like this in a struct:fn __divmod__(self: Self, other: Self) -> Tuple[Self, Self]
What is your motivation for this change?
Each dunder method has its own trait. We should do it for
__divmod__
too.See #2097 (comment)
Any other details?
While trying to implement it, I encountered a blocking error. See the issue #2597 . It might be a compiler bug, or I might misuse traits.
The text was updated successfully, but these errors were encountered: