Skip to content

Conversation

@bttglc
Copy link
Contributor

@bttglc bttglc commented Nov 12, 2025

Summary

Changes

  • Refactored test_dynamic.py to organize tests into test_binop, test_bitwise and test_cmp (following the pattern used in test_int.py)
  • Added missing arithmetic operators for dynamic type: -, /, //, %
  • Added bitwise operators dynamic type: <<, >>, &, |, ^
  • All implementations follow the existing pattern and delegate to _dynamic_op for
    runtime type checking
  • [minor] Moved w_mod above w_div in opimpl_int.py, since that's the order they appear in elsewhere.

Notes

I went ahead and worked on the issue before getting assigned; I hope that's not a problem.
Happy to make any changes based on your feedback! Thanks in advance.

[Summary and Changes generated via claude-code].

  - Refactored test_dynamic.py to organize tests into test_binop, test_cmp, and
  test_bitwise
  - Implemented arithmetic operators: -, /, //, %
  - Implemented bitwise operators: <<, >>, &, |, ^
Copy link
Member

@antocuni antocuni left a comment

Choose a reason for hiding this comment

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

@bttglc LGTM, thank you.

I'm curious, though: did you do it "manually" or you used some LLM/code assistant?
I'm asking mostly because the style in the description looks very similar to what I get from claude from time to time.

Just to be clear: it's fine to use LLMs, I'm just curious.

@antocuni antocuni merged commit dbc078c into spylang:main Nov 12, 2025
2 checks passed
@bttglc
Copy link
Contributor Author

bttglc commented Nov 12, 2025

Thank you!

I was unsure on what the best practice to write PRs is since this is my very first one, so I did indeed use an LLM to write the list of changes in the text above. Would you prefer it to be avoided or at least specified next time?

@antocuni
Copy link
Member

I was unsure on what the best practice to write PRs is since this is my very first one, so I did indeed use an LLM to write the list of changes in the text above. Would you prefer it to be avoided or at least specified next time?

That's a good question. As humans, we are still learning what are the best practices around LLMs.
Personally, I think it's fine to use them but in that case it's a good idea to mention it (both for the code itself and for the text): this way, you help the reviewer to understand what he's reviewing.

Again, you didn't do anything wrong :)

@bttglc
Copy link
Contributor Author

bttglc commented Nov 12, 2025

Makes sense! I'll modify the text according to what emerged in this exchange and next time I'll write if and how I've used an LLM more clearly :)
Thanks for the feedback and the reassurance, until next time!

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.

Improve binop support for the dynamic type

2 participants