@@ -583,17 +583,17 @@ def _defined_method(self: RuntimeExpr, *args, __name: str = name, **kwargs):
583
583
define_expr_method (name )
584
584
585
585
586
- for name , reversed in itertools .product (NUMERIC_BINARY_METHODS , (False , True )):
586
+ for name , r_method in itertools .product (NUMERIC_BINARY_METHODS , (False , True )):
587
587
588
- def _numeric_binary_method (self : object , other : object , name : str = name , reversed : bool = reversed ) -> object :
588
+ def _numeric_binary_method (self : object , other : object , name : str = name , r_method : bool = r_method ) -> object :
589
589
"""
590
590
Implements numeric binary operations.
591
591
592
592
Tries to find the minimum cost conversion of either the LHS or the RHS, by finding all methods with either
593
593
the LHS or the RHS as exactly the right type and then upcasting the other to that type.
594
594
"""
595
- # 1. switch if reversed
596
- if reversed :
595
+ # 1. switch if reversed method
596
+ if r_method :
597
597
self , other = other , self
598
598
# If the types don't exactly match to start, then we need to try converting one of them, by finding the cheapest conversion
599
599
if not (
@@ -646,7 +646,7 @@ def _numeric_binary_method(self: object, other: object, name: str = name, revers
646
646
fn = RuntimeFunction (Thunk .value (self .__egg_decls__ ), Thunk .value (method_ref ), self )
647
647
return fn (other )
648
648
649
- method_name = f"__r{ name [2 :]} " if reversed else name
649
+ method_name = f"__r{ name [2 :]} " if r_method else name
650
650
setattr (RuntimeExpr , method_name , _numeric_binary_method )
651
651
652
652
0 commit comments