Exemple #1
0
 def __repr__(self) -> str:
     strings = self.commentrepr
     prefix = f"{self.name}("
     blanks = " " * len(prefix)
     if self:
         for idx, (th, coefs) in enumerate(self):
             subprefix = f"{prefix}{th}=" if idx == 0 else f"{blanks}{th}="
             strings.append(
                 objecttools.assignrepr_tuple2(coefs, subprefix, 75) + ",")
         strings[-1] = strings[-1][:-1] + ")"
     else:
         strings.append(prefix + ")")
     return "\n".join(strings)
Exemple #2
0
 def __repr__(self):
     strings = self.commentrepr
     prefix = '%s(' % self.name
     blanks = ' ' * len(prefix)
     if self:
         for idx, (th, coefs) in enumerate(self):
             subprefix = ('%s%s=' % (prefix, th) if idx == 0 else '%s%s=' %
                          (blanks, th))
             strings.append(
                 objecttools.assignrepr_tuple2(coefs, subprefix, 75) + ',')
         strings[-1] = strings[-1][:-1] + ')'
     else:
         strings.append(prefix + ')')
     return '\n'.join(strings)
Exemple #3
0
 def __repr__(self):
     strings = self.commentrepr
     prefix = "%s(" % self.name
     blanks = " " * len(prefix)
     if self:
         for idx, (th, coefs) in enumerate(self):
             subprefix = ("%s%s=" % (prefix, th) if idx == 0 else "%s%s=" %
                          (blanks, th))
             strings.append(
                 objecttools.assignrepr_tuple2(coefs, subprefix, 75) + ",")
         strings[-1] = strings[-1][:-1] + ")"
     else:
         strings.append(prefix + ")")
     return "\n".join(strings)