# Chaining Decorators in Python

def star(func):
    def inner(*args, **kwargs):
        print("*" * 30)
        func(*args, **kwargs)
        print("*" * 30)
    return inner

def percent(func):
    def inner(*args, **kwargs):
        print("%" * 30)
        func(*args, **kwargs)
        print("%" * 30)
    return inner

@star #The order in which we chain decorators matters
@percent
def printer(msg):
    print(msg)
printer("Hello")

ffcdde125c8a9e51e14e5ab1c0a5cf900ae9ae86
<mask token>


def percent(func):

    def inner(*args, **kwargs):
        print('%' * 30)
        func(*args, **kwargs)
        print('%' * 30)
    return inner


<mask token>

<mask token>


def percent(func):

    def inner(*args, **kwargs):
        print('%' * 30)
        func(*args, **kwargs)
        print('%' * 30)
    return inner


@star
@percent
def printer(msg):
    print(msg)


<mask token>

def star(func):

    def inner(*args, **kwargs):
        print('*' * 30)
        func(*args, **kwargs)
        print('*' * 30)
    return inner


def percent(func):

    def inner(*args, **kwargs):
        print('%' * 30)
        func(*args, **kwargs)
        print('%' * 30)
    return inner


@star
@percent
def printer(msg):
    print(msg)


<mask token>

def star(func):

    def inner(*args, **kwargs):
        print('*' * 30)
        func(*args, **kwargs)
        print('*' * 30)
    return inner


def percent(func):

    def inner(*args, **kwargs):
        print('%' * 30)
        func(*args, **kwargs)
        print('%' * 30)
    return inner


@star
@percent
def printer(msg):
    print(msg)


printer('Hello')

# Chaining Decorators in Python

def star(func):
    def inner(*args, **kwargs):
        print("*" * 30)
        func(*args, **kwargs)
        print("*" * 30)
    return inner

def percent(func):
    def inner(*args, **kwargs):
        print("%" * 30)
        func(*args, **kwargs)
        print("%" * 30)
    return inner

@star #The order in which we chain decorators matters
@percent
def printer(msg):
    print(msg)
printer("Hello")
