db.py 文件源码

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

项目:server 作者: viur-framework 项目源码 文件源码
def set( self, key, value, indexed=True ):
        """
            Sets a property.

            :param key: key of the property to set.
            :type key: str
            :param value: Any value to set tot the property.

            :param indexed: Defines if the value is indexed.
            :type indexed: bool

            :raises: :exc:`BadPropertyError` if the property name is the \
            empty string or not a string.
            :raises: :exc:`BadValueError` if the value is not a supported type.
        """
        if not indexed:
            unindexed = list( self.getUnindexedProperties() )
            if not key in unindexed:
                self.setUnindexedProperties( unindexed+[key] )
        self[ key ] = value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号