changeset 20726:6eb9c4a9a12b

revset: use more explicit argument names for baseset methods Use other instead of x and condition instead of l
author Lucas Moscovicz <lmoscovicz@fb.com>
date Fri, 14 Mar 2014 10:10:18 -0700
parents cf628b50afbb
children 1e59f760d850
files mercurial/revset.py
diffstat 1 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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