Passing a list as an argument with * leads to confusing error #3224
Labels
topic-calls
Function calls, *args, **kwargs, defaults
topic-error-reporting
How we report errors
topic-usability
(Originally reported at python/typeshed#814, which gives an example from real code.)
Ideally this shouldn't be an error at all (this works fine at runtime), but I imagine it's hard for mypy to accept this code since it doesn't know how long the list is. However, we could at least fix the error message, which talks about "argument 1" needing to be a str when really it's argument 2 that is the problem.
The text was updated successfully, but these errors were encountered: