Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python decorator generator to list

One can also define a ‘dictate’ decorator as follows:

from functools import wraps

def dictate(func):
    @wraps(func)
    def patched(*args, **kwargs):
        return dict(*func(*args, **kwargs))
    return patched
Source by argandgahandapandpa.wordpress.com #
 
PREVIOUS NEXT
Tagged: #python #decorator #generator #list
ADD COMMENT
Topic
Name
1+9 =