Skip to content

Commit aad234e

Browse files
committed
another attempt
1 parent 2c9b4e5 commit aad234e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test_cases/stdlib/check_itertools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ def unique_justseen(iterable: Iterable[_T], key: Callable[[_T], bool] | None = N
307307
"List unique elements, preserving order. Remember only the element just seen."
308308
# unique_justseen('AAAABBBCCDAABBB') --> A B C D A B
309309
# unique_justseen('ABBcCAD', str.lower) --> A B c A D
310-
return map(next, map(operator.itemgetter(1), groupby(iterable, key)))
310+
g: groupby[_T, _T] | groupby[bool, _T] = groupby(iterable, key)
311+
return map(next, map(operator.itemgetter(1), g))
311312

312313

313314
def powerset(iterable: Iterable[_T]) -> Iterator[tuple[_T, ...]]:

0 commit comments

Comments
 (0)