revset: use more explicit argument names for baseset methods
authorLucas Moscovicz <lmoscovicz@fb.com>
Fri, 14 Mar 2014 10:10:18 -0700
changeset 20726 6eb9c4a9a12b
parent 20725 cf628b50afbb
child 20727 1e59f760d850
revset: use more explicit argument names for baseset methods Use other instead of x and condition instead of l
mercurial/revset.py
--- a/mercurial/revset.py	Tue Mar 11 17:09:23 2014 -0700
+++ b/mercurial/revset.py	Fri Mar 14 10:10:18 2014 -0700
@@ -2187,21 +2187,21 @@
             self._set = set(self)
         return self._set
 
-    def __sub__(self, x):
-        if isinstance(x, baseset):
-            s = x.set()
+    def __sub__(self, other):
+        if isinstance(other, baseset):
+            s = other.set()
         else:
-            s = set(x)
+            s = set(other)
         return baseset(self.set() - s)
 
-    def __and__(self, x):
-        if isinstance(x, baseset):
-            x = x.set()
-        return baseset([y for y in self if y in x])
+    def __and__(self, other):
 
-    def __add__(self, x):
+        if isinstance(other, baseset):
+            other = other.set()
+        return baseset([y for y in self if y in other])
+    def __add__(self, other):
         s = self.set()
-        l = [r for r in x if r not in s]
+        l = [r for r in other if r not in s]
         return baseset(list(self) + l)
 
     def isascending(self):
@@ -2210,8 +2210,8 @@
     def isdescending(self):
         return False
 
-    def filter(self, l):
-        return lazyset(self, l)
+    def filter(self, condition):
+        return lazyset(self, condition)
 
 class lazyset(object):
     """Duck type for baseset class which iterates lazily over the revisions in