Does Python have equivalent to MATLAB "varargin", "varargout", "nargin", "nargout"?
openopt at ukr.net
openopt at ukr.net
Mon Feb 19 02:56:15 EST 2007
More information about the Python-list mailing list
Mon Feb 19 02:56:15 EST 2007
- Previous message (by thread): generating Java bytecode
- Next message (by thread): Does Python have equivalent to MATLAB "varargin", "varargout", "nargin", "nargout"?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ok, thx But can I somehow determing how many outputs does caller func require? for example: MATLAB: function [objFunVal firstDerive secondDerive] = simpleObjFun(x) objFunVal = x^3; if nargout>1 firstDerive = 3*x^2; end if nargout>2 secondDerive = 6*x; end So if caller wants only [objFunVal firstDerive] = simpleObjFun(15) than 2nd derivatives don't must to be calculated with wasting cputime. Is something like that in Python?
- Previous message (by thread): generating Java bytecode
- Next message (by thread): Does Python have equivalent to MATLAB "varargin", "varargout", "nargin", "nargout"?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list