Skip to content

Commit

Permalink
Fix the fractcions module so that __rpow__ works on arbitrary classes.
Browse files Browse the repository at this point in the history
The fraction module implicitly casted float if __rpow__ was implemented in your class when raising a fraction to a power. Now it isn't done but will raise an exception if __rpow__ isn't implemented.
  • Loading branch information
zitterbewegung committed May 20, 2024
1 parent 1195c16 commit 1c66571
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ Kasun Herath
Chris Herborth
Ivan Herman
Jürgen Hermann
Joshua Jay Herman
Gary Herron
Ernie Hershey
Thomas Herve
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This fixes a situation where raising a class with rpow in the class calling
the exponent operator to raise it to the power of that class to not cast it
as a float.

0 comments on commit 1c66571

Please sign in to comment.