equal
deleted
inserted
replaced
1143 ss = subset |
1143 ss = subset |
1144 os = getset(repo, fullreposet(repo), l[0]) |
1144 os = getset(repo, fullreposet(repo), l[0]) |
1145 result = [] |
1145 result = [] |
1146 it = iter(os) |
1146 it = iter(os) |
1147 for x in xrange(lim): |
1147 for x in xrange(lim): |
1148 try: |
1148 y = next(it, None) |
1149 y = it.next() |
1149 if y is None: |
1150 if y in ss: |
|
1151 result.append(y) |
|
1152 except (StopIteration): |
|
1153 break |
1150 break |
|
1151 elif y in ss: |
|
1152 result.append(y) |
1154 return baseset(result) |
1153 return baseset(result) |
1155 |
1154 |
1156 def last(repo, subset, x): |
1155 def last(repo, subset, x): |
1157 """``last(set, [n])`` |
1156 """``last(set, [n])`` |
1158 Last n members of set, defaulting to 1. |
1157 Last n members of set, defaulting to 1. |