implement ObjectID.from_random

This commit is contained in:
Philipp Moritz committed 2017-08-26 18:26:01 -07:00
1 parent c0449543dc
commit 36f67d6d9d
1 file changed
+6
+6
View File
@@ -159,6 +159,12 @@ cdef class ObjectID:
"""
return self.data.binary()
@staticmethod
def from_random():
cdef ObjectID result
result.data = CUniqueID.from_random()
return result
cdef class ObjectNotAvailable:
"""