Comments
Patch
@@ -2293,14 +2293,17 @@ class abstractsmartset(object):
if cache and util.safehasattr(condition, 'func_code'):
condition = util.cachefunc(condition)
return filteredset(self, condition)
class baseset(abstractsmartset):
- """Basic data structure that represents a revset and contains the basic
- operation that it should be able to perform.
-
- Every method in this class should be implemented by any smartset class.
+ """A smartset with explicit elements
+
+ A `baseset` object is provided all its content at creation time. All
+ sortings and reordering can then happen lazily and membership testing is
+ fast because it is backed up by a native python set. The iteration order is
+ controled by the order of data initially provided. To enforce a different
+ order, use the `.sort()` or `.sort(reverse=True)` methods.
"""
def __init__(self, data=()):
if not isinstance(data, list):
data = list(data)
self._list = data