Skip to content

Commit

Permalink
Add regression test for #859 (#1468)
Browse files Browse the repository at this point in the history
  • Loading branch information
rwbarton authored and gvanrossum committed May 3, 2016
1 parent 3acdf54 commit 410bf37
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mypy/test/data/pythoneval.test
Original file line number Diff line number Diff line change
Expand Up @@ -1153,3 +1153,13 @@ b = B()
print(b.x + 1)
[out]
4

[case testInferenceWithLambda]
from typing import TypeVar, Iterable, Iterator
import itertools

_T = TypeVar('_T')

def f(iterable): # type: (Iterable[_T]) -> Iterator[List[_T]]
grouped = itertools.groupby(enumerate(iterable), lambda pair: pair[0] // 2)
return ([elem for _, elem in group] for _, group in grouped)

0 comments on commit 410bf37

Please sign in to comment.