# -*- coding: utf-8 -*-
from functools import wraps

def deco_entity(func):
    @wraps(func)
    def decorated(*args, **kwargs):
        print(func.__name__+" decorater in")
        handle = func(*args, **kwargs)
        print(func.__name__ + " decorater out")
        return handle
    return decorated


class test_a():
    def __init__(self):
        self.m_donkey = 'this is my donkey!!'
    @deco_entity
    def aaa(self):
        print("this is aaa function!!!")
        self.bbb()
        print(self.m_donkey)

    def bbb(self):
        print("this is bbb function!!!")


if __name__ == "__main__":
    b = test_a()
    b.aaa()


3d32094925420023d3af2aebdae80d1d5dbb96c4
<mask token>


class test_a:

    def __init__(self):
        self.m_donkey = 'this is my donkey!!'
    <mask token>
    <mask token>


<mask token>

<mask token>


class test_a:

    def __init__(self):
        self.m_donkey = 'this is my donkey!!'

    @deco_entity
    def aaa(self):
        print('this is aaa function!!!')
        self.bbb()
        print(self.m_donkey)
    <mask token>


<mask token>

<mask token>


def deco_entity(func):

    @wraps(func)
    def decorated(*args, **kwargs):
        print(func.__name__ + ' decorater in')
        handle = func(*args, **kwargs)
        print(func.__name__ + ' decorater out')
        return handle
    return decorated


class test_a:

    def __init__(self):
        self.m_donkey = 'this is my donkey!!'

    @deco_entity
    def aaa(self):
        print('this is aaa function!!!')
        self.bbb()
        print(self.m_donkey)

    def bbb(self):
        print('this is bbb function!!!')


if __name__ == '__main__':
    b = test_a()
    b.aaa()

from functools import wraps


def deco_entity(func):

    @wraps(func)
    def decorated(*args, **kwargs):
        print(func.__name__ + ' decorater in')
        handle = func(*args, **kwargs)
        print(func.__name__ + ' decorater out')
        return handle
    return decorated


class test_a:

    def __init__(self):
        self.m_donkey = 'this is my donkey!!'

    @deco_entity
    def aaa(self):
        print('this is aaa function!!!')
        self.bbb()
        print(self.m_donkey)

    def bbb(self):
        print('this is bbb function!!!')


if __name__ == '__main__':
    b = test_a()
    b.aaa()

# -*- coding: utf-8 -*-
from functools import wraps

def deco_entity(func):
    @wraps(func)
    def decorated(*args, **kwargs):
        print(func.__name__+" decorater in")
        handle = func(*args, **kwargs)
        print(func.__name__ + " decorater out")
        return handle
    return decorated


class test_a():
    def __init__(self):
        self.m_donkey = 'this is my donkey!!'
    @deco_entity
    def aaa(self):
        print("this is aaa function!!!")
        self.bbb()
        print(self.m_donkey)

    def bbb(self):
        print("this is bbb function!!!")


if __name__ == "__main__":
    b = test_a()
    b.aaa()

