Ejemplo n.º 1
0
 def synthesized_repr(self):
     return "{typename}({args})".format(
         typename=typename(self),
         args=", ".join(
             "{name}={value!r}".format(
                 name=name,
                 value=getattr(self, name)
             ) for name in parameter_names
         )
     )
 def synthesized_repr(self):
     return "{typename}({args})".format(
         # to report runtime dynamic type of self
         typename=typename(self),
         args=",".join(
             # using repr here so resulting string looks like source code
             "{name}={value!r}".format(
                 # to retrive property value from self instance
                 name=name,
                 value=getattr(self, name)
             ) for name in parameter_names
         )
     )
Ejemplo n.º 3
0
 def synthesized_repr(self):
     return "{typename}({args})".format(typename=typename(self), )
Ejemplo n.º 4
0
 def synthesized_repr(self):
     return "{typename}({args})".format(typename=typename(self),
                                        args=", ".join(
                                            "{name}={value!r}".format()))