Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

function wrapper with variable number of arguments python

def dec(function):
    def _wrapper(*args, **kwargs):
        print len(args) + len(kwargs)
        return function(*args, **kwargs)
    return _wrapper
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #function #wrapper #variable #number #arguments #python
ADD COMMENT
Topic
Name
2+3 =