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
Cannot overwrite the __str__ method in jitclass #8531
Comments
Thanks for the report @pietrodantuono. I think this was implemented in 0.56: Lines 80 to 84 in f4b6fe0
and it (jitclass __str__ method) seems to work for me locally on main . If you can, perhaps try updating to 0.56 and seeing if that now works as expected with the above?
|
Thank you @stuartarchibald! After updating to 0.56.3, the My bad, I did not notice it from the Release notes
(https://numba.readthedocs.io/en/stable/release-notes.html#version-0-56-0-25-july-2022) Next question: what about |
No problem, glad it is working now.
I suggest opening a feature request if it is important to you. I think it's technically possible to support it. |
Done! Ref. #8533 |
Great, many thanks. I'll close this issue as resolved. |
Hello,
I am not able to overwrite the string representation of a jitclass. I do not know if this is a wanted behaviour though.
Produces:
Expected:
It seems that the
__str__()
method is skipped entirely, in fact the following does not produce anyZeroDivisionError
.Tested on:
The text was updated successfully, but these errors were encountered: