From 36836028662777caebae038c40d8093146b27a28 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Fri, 4 Dec 2009 21:44:45 -0300 Subject: [PATCH] discount one to min pos args for classmethod (complementary fix for #454) --- Cython/Compiler/Nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index d779fd02..c2ed6923 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -2075,7 +2075,7 @@ class DefNode(FuncDefNode): argtuple_error_label = code.new_label("argtuple_error") min_positional_args = self.num_required_args - self.num_required_kw_args - if len(self.args) > 0 and self.args[0].is_self_arg: + if len(self.args) > 0 and (self.args[0].is_self_arg or self.args[0].is_type_arg): min_positional_args -= 1 max_positional_args = len(positional_args) has_fixed_positional_count = not self.star_arg and \ -- 2.26.2