From: Lisandro Dalcin Date: Sat, 5 Dec 2009 00:44:45 +0000 (-0300) Subject: discount one to min pos args for classmethod (complementary fix for #454) X-Git-Tag: 0.12.1~86 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=36836028662777caebae038c40d8093146b27a28;p=cython.git discount one to min pos args for classmethod (complementary fix for #454) --- 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 \