core.py 文件源码

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

项目:ome-model 作者: ome 项目源码 文件源码
def filter(self, *filters):
        """Apply filters to the stream.

        This method returns a new stream with the given filters applied. The
        filters must be callables that accept the stream object as parameter,
        and return the filtered stream.

        The call::

            stream.filter(filter1, filter2)

        is equivalent to::

            stream | filter1 | filter2

        :param filters: one or more callable objects that should be applied as
                        filters
        :return: the filtered stream
        :rtype: `Stream`
        """
        return reduce(operator.or_, (self,) + filters)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号