def getMelRepresentation( args, recursionLimit=None, maintainDicts=True):
    """Will return a list which contains each element of the iterable 'args' converted to a mel-friendly representation.

    :Parameters:
        recursionLimit : int or None
            If an element of args is itself iterable, recursionLimit specifies the depth to which iterable elements
            will recursively search for objects to convert; if ``recursionLimit==0``, only the elements
            of args itself will be searched for PyNodes -  if it is 1, iterables within args will have getMelRepresentation called
            on them, etc.  If recursionLimit==None, then there is no limit to recursion depth.

        maintainDicts : bool
            In general, all iterables will be converted to tuples in the returned copy - however, if maintainDicts==True,
            then iterables for which ``util.isMapping()`` returns True will be returned as dicts.

    """
    if recursionLimit:
        recursionLimit -= 1


    if maintainDicts and util.isMapping(args):
        newargs = dict(args)
        argIterable = args.iteritems()
        isList = False
    else:
        newargs = list(args)
        argIterable = enumerate(args)
        isList = True

    for index, value in argIterable:
        try:
            newargs[index] = value.__melobject__()
        except __HOLE__:
            if ( (not recursionLimit) or recursionLimit >= 0) and util.isIterable(value):
                # ...otherwise, recurse if not at recursion limit and  it's iterable
                newargs[index] = getMelRepresentation(value, recursionLimit, maintainDicts)
    if isList:
        newargs = tuple(newargs)
    return newargs
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.5/pymel/internal/pmcmds.py/getMelRepresentation