def __repr__(self):
    """Create a string that can be used to construct an equivalent object.

    e.g. eval(repr(obj)) == obj
    """
    # First, creates a dictionary of property names and values. Note that
    # property values, not property objects, has to be passed in to constructor.
    def _MakeReprTuple(prop_name):
      prop = getattr(self.__class__, prop_name)
      return (prop_name, prop.get_value_for_datastore(self))

    d = dict([_MakeReprTuple(prop_name) for prop_name in self.properties()])
    return "%s(**%s)" % (self.__class__.__name__, repr(d))
dataset/ETHPy150Open CollabQ/CollabQ/appengine_django/models.py/BaseModel.__repr__/original