__init__.py 文件源码

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

项目:cryptogram 作者: xinmingzhang 项目源码 文件源码
def _PlatformEventHandler(data):
    """Decorator for platform event handlers.  

    Apply giving the platform-specific data needed by the window to associate
    the method with an event.  See platform-specific subclasses of this
    decorator for examples.

    The following attributes are set on the function, which is returned
    otherwise unchanged:

    _platform_event
        True
    _platform_event_data
        List of data applied to the function (permitting multiple decorators
        on the same method).
    """
    def _event_wrapper(f):
        f._platform_event = True
        if not hasattr(f, '_platform_event_data'):
            f._platform_event_data = []
        f._platform_event_data.append(data)
        return f
    return _event_wrapper
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号