Implement comprehensive Python set operations transpilation#470
Implement comprehensive Python set operations transpilation#470yaskhan wants to merge 4 commits into
Conversation
Replaced the incorrect transpilation of Python's `any()` and `all()` to non-existent native V methods `.any(it)` and `.all(it)`. Changes: - Implemented `py_any[T](a []T) bool`, `py_all[T](a []T) bool`, and `py_bool(val Any) bool` generic V helper functions. - Updated `calls_generators.py` to use these helpers. - Handled generator expressions by transpiling them to boolean arrays via `.map()`. - Updated unit tests. Co-authored-by: yaskhan <3676373+yaskhan@users.noreply.github.com>
…4238494311840928636 Fix any() and all() transpilation to V
…69514009004 Fix missing py_repr helper injection in f-strings and built-in calls
Co-authored-by: yaskhan <3676373+yaskhan@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
592f0b8 to
db8e305
Compare
Implement comprehensive Python set operations transpilation.
Key changes:
TypeInferenceVisitorMixinandTypeInferenceUtilsMixin.py_set_from_listhelper for iterable arguments incalls_builtin.py.add,discard,remove,pop,clear,union,intersection,difference,symmetric_difference,update,intersection_update,difference_update,symmetric_difference_update,issubset,issuperset,isdisjoint) to V constructs or specialized generic V helpers incalls_methods.py.<,<=,>,>=) usingpy_set_subsetandpy_set_strict_subsethelpers inoperators.py.module.py.main.pyto register the new set helpers for global generation.test_set_full_ops.pyand verified all existing set tests pass.PR created automatically by Jules for task 17434249445235205561 started by @yaskhan