From 9d95a2b21d79dc7eebfae9bf6d6dfd69388329f4 Mon Sep 17 00:00:00 2001
From: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Date: Sun, 26 Jan 2014 01:58:51 +0200
Subject: [PATCH] Functions of fixed number of args are special-cased only for
 3 or less args.

---
 py/objfun.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/py/objfun.c b/py/objfun.c
index 1f6ad68ea..fe4f49430 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -63,7 +63,7 @@ mp_obj_t fun_native_call(mp_obj_t self_in, uint n_args, uint n_kw, const mp_obj_
 
         return res;
 
-    } else if (self->n_args_min == self->n_args_max) {
+    } else if (self->n_args_min <= 3 && self->n_args_min == self->n_args_max) {
         // function requires a fixed number of arguments
 
         // dispatch function call
-- 
GitLab