title: Convert varargin and nargin to from Matlab to Python
body: <p>How would one convert the following Matlab code to Python? Are there equivalent functions to Matlab's <code>varargin</code> and <code>nargin</code> in Python?</p>
  
  <pre class="lang-matlab prettyprint-override"><code>function obj = Con(varargin)
  
      if nargin == 0
          return
      end
  
      numNodes = length(varargin);
      obj.node = craft.empty();
      obj.node(numNodes,1) = craft();
  
      for n = 1:numNodes                
          % isa(obj,ClassName) returns true if obj is an instance of 
          % the class specified by ClassName, and false otherwise. 
  
          % varargin is an input variable in a function definition 
          % statement that enables the function to accept any number 
          % of input arguments.
  
          if isa(varargin{n},'craft')
              obj.node(n) = varargin{n};
          else
              error(Invalid input for nodes property.');
          end
      end
  end
  </code></pre>