Browse Source

first commit

master
Mario Alegre 5 years ago
commit
2869b809f6
  1. 1
      python/.gitignore
  2. 11
      python/FracAndDec.py

1
python/.gitignore

@ -0,0 +1 @@
__pycache__

11
python/FracAndDec.py

@ -0,0 +1,11 @@
import decimal
import fractions
class Dec(decimal.Decimal):
def __Fraction__(self):
return self.__new__(self.numerator) / self.__new__(self.denominator)
getcontext = decimal.getcontext
class Frac(fractions.Fraction):
pass
Loading…
Cancel
Save