interfaces.py 文件源码

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

项目:guillotina 作者: plone 项目源码 文件源码
def provide_adapter(factory, adapts=None, provides=None, name=_BLANK):
        """Register an adapter globally

        An adapter is registered to provide an interface with a name
        for some number of object types. If a factory implements only
        one interface, then the provides argument can be omitted and
        the provided interface will be used. (In this case, a provides
        argument can still be provided to provide a less specific
        interface.)

        If the factory has an adapts declaration, then the adapts
        argument can be omitted and the declaration will be used.  (An
        adapts argument can be provided to override the declaration.)

        CAUTION: This API should only be used from test or
        application-setup code. This API shouldn't be used by regular
        library modules, as component registration is a configuration
        activity.
        """
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号