예제 #1
0
파일: frac.py 프로젝트: rmmilewi/Prove-It
 def string(self, **kwargs):
     '''
     Format as "fraction(A, B)".
     '''
     return Operation.string(self, **kwargs)
예제 #2
0
파일: qmult.py 프로젝트: PyProveIt/Prove-It
 def string(self, **kwargs):
     if self.operands.is_single():
         # Single operand: wrap it in square braces to show
         # we are treating it as an operator (a function).
         return '[' + self.operand.string() + ']'
     return Operation.string(self, **kwargs)