Commits

Daniel Ostrowski committed e27ce6e

add a TODO to puzzle over and add an exists call

Comments (0)

Files changed (1)

riakdoc/documents.py

         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]