def deprecated(funcOrMessage, className=None):
    """the decorator can either receive parameters or the function directly.

    If passed a message, the message will be appended to the standard deprecation warning and should serve to further
    clarify why the function is being deprecated and/or suggest an alternative function

    the className parameter is optional and should be included if the function is a method, since the name of the class
    cannot be automatically determined.
    """
    #@decorator
    def deprecated2(func):
        info = dict(
            name = func.__name__,
            module = func.__module__)

        def deprecationLoggedFunc(*args, **kwargs):
            warnings.warn(info % message, DeprecationWarning, stacklevel=2)  # add to the stack-level so that this wrapper func is skipped
            return func(*args, **kwargs)

        deprecationLoggedFunc.__name__ = func.__name__
        deprecationLoggedFunc.__module__ = func.__module__
        deprecationLoggedFunc.__doc__ = message % info + '\n'
        if func.__doc__:
            deprecationLoggedFunc.__doc__ += '\n' +  func.__doc__
        return deprecationLoggedFunc

    if className:
        objName = '%(module)s.' + className + '.%(name)s'
    else:
        objName = '%(module)s.%(name)s'
    basemessage = message = "The function '" + objName + "' is deprecated and will become unavailable in future pymel versions"
    # check if the decorator got a 'message' parameter
    if isinstance(funcOrMessage, basestring):
        message = basemessage + '. ' + funcOrMessage
        return deprecated2
    else:
        message = basemessage
        return deprecated2(funcOrMessage)
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/pymel/internal/pwarnings.py/deprecated/swapped operands of `%`