annotators.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:coordinates 作者: markovmodel 项目源码 文件源码
def __call__(self, f):
        """
        Method call wrapper. As this decorator has arguments, this method will
        only be called once as a part of the decoration process, receiving only
        one argument: the decorated function ('f'). As a result of this kind of
        decorator, this method must return the callable that will wrap the
        decorated function.
        """
        if isinstance(f, property):
            f.fget._aliases = self.aliases
        else:
            f._aliases = self.aliases
        return f
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号