You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
245 B
11 lines
245 B
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
|
|
|