Skip to content

Commit

Permalink
nargin bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlei committed Oct 12, 2014
1 parent 420ba5e commit c50a47e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions smop/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,11 @@ def _backend(self,level=0):
s = "def %s(*args,**kwargs):\n" % self.ident._backend()
else:
s = "def %s(%s,*args,**kwargs):\n" % (self.ident._backend(),
self.args[:-1]._backend())
node.expr_list(self.args[:-1])._backend())
s += ' varargin = cellarray(args)\n'
s += ' nargin = len(args)+%d\n' % (len(self.args)-1)

#s += ' nargin = len(args)+%d\n' % (len(self.args)-1)
if self.use_nargin:
s += '\n nargin = %s.__code__.co_argcount\n' % self.ident._backend()
return s

"""
Expand Down

0 comments on commit c50a47e

Please sign in to comment.