__init__.py 文件源码

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

项目:sqlalchemy-media 作者: pylover 项目源码 文件源码
def register(cls, key: str, store_factory, default: bool=False):
        """
        Registers the store factory into stores registry, use :meth:`unregister` to remove it.

        :param key: The unique key for store.
        :param store_factory: A callable that returns an instance of :class:`.Store`.
        :param default: If :data:`True` the given store will be marked as default also. in addition you can use
                        :meth:`.make_default` to mark a store as default.
        """
        _factories[key] = store_factory
        if default:
            cls._default = key
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号