Generic Higher order Function Confusion #1105
Answered
by
erictraut
hmc-cs-mdrissi
asked this question in
Q&A
-
Why does x = [[1, 2, 3]]
y = map(set, x)
reveal_type(y) # map[set[unknown]] x = [[1, 2, 3]]
y = map(lambda ls: set(ls), x)
reveal_type(y) # map[set[int]] This shows same behavior for both mypy and pyright and I'm confused why the two code blocks are handled differently. |
Beta Was this translation helpful? Give feedback.
Answered by
erictraut
Mar 17, 2022
Replies: 1 comment
-
For reference, I answered this question in a related issue in the pyright issue tracker. microsoft/pyright#3208 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
hmc-cs-mdrissi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For reference, I answered this question in a related issue in the pyright issue tracker. microsoft/pyright#3208