Demo entry 6369741

decorator

   

Submitted by anonymous on May 22, 2017 at 23:03
Language: Python 3. Code size: 105 Bytes.

def suqare_decorator(func):
    def func_wrapper(x):
        return func(x)**2
    return func_wrapper

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).