Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

use decorator more than once

def decorator(function):
    def _wrapper(*args, **kwargs):
        ...
        return
    # Renaming the function name:
    _wrapper.__name__ = function.__name__
    return _wrapper
 
PREVIOUS NEXT
Tagged: #decorator
ADD COMMENT
Topic
Name
1+6 =