예제 #1
0
파일: exp.py 프로젝트: wdcraft01/Prove-It
 def remakeConstructor(self):
     if self.getStyle('exponent') == 'radical':
         # Use a different constructor if using the 'radical' style.
         if self.exponent == frac(one, two):
             return 'sqrt' 
         else:
             raise ValueError("Unkown radical type, exponentiating to the power "
                              "of %s"%str(self.exponent))
     return Operation.remakeConstructor(self)
예제 #2
0
파일: divide.py 프로젝트: rmmilewi/Prove-It
 def remakeConstructor(self):
     if self.getStyle('division') == 'fraction':
         return 'Frac' # use a different constructor if using the fraction style
     return Operation.remakeConstructor(self)