itertools.groupby
should be typesafe
#5713
winstxnhdw
started this conversation in
Ideas
Replies: 1 comment
-
I don't see any practical way to make this type safe even with custom logic. I recommend avoiding this function if you want your code to be type safe. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently,
Pyright
is unable to infer the type of a element from agroupby
. Thinking about it, this is probably impossible to implement unless thePyright
team decides to do a custom check for this. However, since this is a built-in module, I think it is still something we should consider.Beta Was this translation helpful? Give feedback.
All reactions