Exemple #1
0
 def __repr__(self):
     return type(self).__name__ + "(" + ", ".join(
         _maybe_parenthesise(p) for p in self.parts) + ")"
Exemple #2
0
 def __str__(self):
     return " * ".join(_maybe_parenthesise(p) for p in self.parts)
Exemple #3
0
 def __str__(self):
     return f"1/" + _maybe_parenthesise(self.inner)
Exemple #4
0
 def __str__(self):
     return type(self).__name__ + '(' \
            + ", ".join(_maybe_parenthesise(p) for p in self.parts) \
            + ')'