This adds one more commit on top of #848 and squashes the commits.
Thanks to @fchapoton for spotting the issue and suggesting initial fixes.
This adds one more commit on top of #848 and squashes the commits.
Thanks to @fchapoton for spotting the issue and suggesting initial fixes.
99@@ -100,7 +100,7 @@ class fastfrac:
100 """Multiply something else with a fraction."""
101 return self.__mul__(other)
102
103- def __div__(self,other):
104+ def __truediv__(self,other):
__div__
definition (which shouldn’t affect python 3) and add __truediv__
? I tested that with this change both versions give the same output.
I can do this but I don’t understand that this helps for sage 8.9 because it’s based on python 2 and all the other changes should break it. So you’re saying this works for you?
110 return NotImplemented
111
112+ # Compatibility wrapper for Sage versions based on Python 2
113+ def __div__(self,other):
114+ """Divide two fractions."""
115+ return __truediv__(self,other)
NameError: global name '__truediv__' is not defined
. This should be return self.__truediv__(other)
nix-shell -p sage
would work but the tests take forever. Therefore you can use nix-shell '-p sage.overrideAttrs (oldAttrs: rec { buildInputs = [ makeWrapper ]; })'
to disable the tests.
Co-authored-by: Tim Ruffing <crypto@timruffing.de>