id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
24247 Implement __pow__ in the coercion model jdemeyer "`__pow__` is harder than most other arithmetic coercions because you sometimes want the exponent to be an integer and sometimes you want full coercion.
To solve this, we essentially do as follows:
1. If the arguments have equal parents, call `_pow_`.
2. If the exponent is ""integer-like"", call `_pow_int`.
3. If none of the above applies, do the usual coercion to a common parent. That will call `_pow_` unless the coerced arguments have a custom implementation of `__pow__`.
Furthermore, the 3-argument version of `pow()` is not supported in the coercion model. Only specific types like `Integer` implement it.
This is related to Python 3 (see #16072) because this check for an integer needs to be changed in light of the changes to the `int`/`long` types." enhancement new major sage-8.1 coercion Jeroen Demeyer N/A u/jdemeyer/implement___pow___in_the_coercion_model 0d3aa638f654dbc104ec85887eedfdb13e271589 #24248, #24259, #24260