def debug(fn):
    '''debugging decorator'''
    def wrapped(*args,**kwargs):
        if bbqsql.settings.DEBUG_FUNCTION_CALLS: print 'Calling into %s' % fn.__name__
        if bbqsql.settings.DEBUG_FUNCTION_ARGUMENTS: print 'Arguments: args:%s - kwargs:%s' % (repr(args),repr(kwargs))
        rval = fn(*args,**kwargs)
        if bbqsql.settings.DEBUG_FUNCTION_RETURNS: print 'Returning from %s' % fn.__name__
        if bbqsql.settings.DEBUG_FUNCTION_RETURN_VALUES: print 'Returning value: %s' % repr(rval)
        return rval
    return wrapped
dataset/ETHPy150Open Neohapsis/bbqsql/bbqsql/utilities.py/debug/original