TP0209
Error: wrong number of arguments
Messages
Section titled “Messages”'<S>' takes <n> type arguments, found <m>(type argumentwhen n is 1) (since M43 also for generic .NET types, and'<T>.<m>' takes <n> type arguments, found <k>for a .NET method)'<v>' has <n> fields, found <m> bindings(variant and dataclass patterns;field/bindingwhen the count is 1)'<C>' is not a dataclass, so its fields can only be bound by namefield '<f>' is given more than once(class patterns, M15)<T> has <n> elements, found <m> names(unpacking)a tuple needs at least two elements(M12)<T> has <n> elements, found <m> patterns(a tuple pattern, M29)<T> has <n> elements, found at least <m> patterns(a tuple pattern with*, M38)'<f>' takes <n> arguments, found <m>(argumentwhen n is 1;1 or 2 argumentsforrange;<a> to <b> argumentsfor a function with defaults, M14;2 or more argumentsforzip, M26;function takes …when the callee isn’t a name)missing argument '<x>'(M14)missing field '<f>' in '<S>'field '<f>' is given more than onceargument '<k>' is given more than once'<f>' takes <n> positional arguments, found <m>missing keyword-only argument '<x>''*<e>' can only fill '*<args>''<f>' has no '*args' for '*<e>''<f>' has no '**kwargs' for '**<e>''**<e>' can't fill '<x>'(M30)expected a lambda with <n> parameters, found <m>(parameterwhen n is 1)'Callable' takes a parameter list and a result type
Example
Section titled “Example”From the golden case tests/cases/m38/tp0209_star.tpn:
def f(t: tuple[int, int]) -> None: match t: (a, b, *c, d): pass _: passThe compiler reports:
tp0209_star.tpn:3:9: error TP0209: tuple[int, int] has 2 elements, found at least 3 patternsThe specification lists every code.
© 2026 Discover Edge, LLC · Taipan is released under the MIT License.