def _buildArgs(f, self=None, kwargs={}):
 argTuples = getArgumentDescriptions(f)
 argTuples = argTuples[1:]
 init = SPRegion.__init__
 ourArgNames = [t[0] for t in getArgumentDescriptions(init)]
 ourArgNames += ['numberOfCols']
 for argTuple in argTuples[:]:
  if (argTuple[0] in ourArgNames):
   argTuples.remove(argTuple)
 if self:
  for argTuple in argTuples:
   argName = argTuple[0]
   if (argName in kwargs):
    argValue = kwargs.pop(argName)
   else:
    if (len(argTuple) == 2):
     raise TypeError(("Must provide value for '%s'" % argName))
    argValue = argTuple[2]
   setattr(self, argName, argValue)
 return argTuples

def _buildArgs ( f , self = None , kwargs = { } ) : argTuples = getArgumentDescriptions ( f ) argTuples = argTuples [ 1 : ] init = SPRegion . __init__ ourArgNames = [ t [ 0 ] for t in getArgumentDescriptions ( init ) ] ourArgNames += [ 'numberOfCols' ] for argTuple in argTuples [ : ] : if ( argTuple [ 0 ] in ourArgNames ) : argTuples . remove ( argTuple ) if self : for argTuple in argTuples : argName = argTuple [ 0 ] if ( argName in kwargs ) : argValue = kwargs . pop ( argName ) else : if ( len ( argTuple ) == 2 ) : raise TypeError ( ( "Must provide value for '%s'" % argName ) ) argValue = argTuple [ 2 ] setattr ( self , argName , argValue ) return argTuples
get the default arguments from the function and assign as instance vars .