1. Daniel Ostrowski
  2. riakdocs

Commits

Daniel Ostrowski  committed e27ce6e

add a TODO to puzzle over and add an exists call

  • Participants
  • Parent commits 5ab54ab
  • Branches default

Comments (0)

Files changed (1)

File riakdoc/documents.py

View file
         return u'{0} document "{1}": {2}'.format(self.__class__.__name__, self.key, str(self.data)[:100])
 
     def __repr__(self):
+        # TODO: If this object exists, passing in d=X raises an exception because of noclobber
         return "{klass}('{key}', d={data})".format(klass=self.__class__.__name__, key=self.key, data=repr(self.data))
 
     def __str__(self):
         """
         self._obj.delete()
 
+    def exists(self):
+        return self._obj.exists()
+
     def __getitem__(self, item):
         return self.data[item]