You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: Incompatible types in assignment (expression has type "Callable[[VarArg(str), NamedArg(int)], int]", variable has type "F")
note: "F.__call__" has type "Callable[[VarArg(str), NamedArg(int)], int]"
Found 1 error in 1 file (checked 1 source file)
Yeah I think this is expected behavior with a confusing message? Double underscore means positional-only and you are putting in a keyword-only position, which then doesn't match. Probably we should error on arguments that are both keyword-only and positional-only.
msullivan
changed the title
Varargs with Callable Protocols
Reject arguments that are both keyword and positional only
Jan 9, 2020
I tried to use
Calalble
protocol like this:but it fails with quite confusing message:
If I move varargs, things pass:
I cannot say if this is a bug, or expected behaviour with confusing message.
The text was updated successfully, but these errors were encountered: