ebbe:python的迭代器相关函数的集合

时间:2021-04-17 05:47:05
【文件属性】:
文件名称:ebbe:python的迭代器相关函数的集合
文件大小:11KB
文件格式:ZIP
更新时间:2021-04-17 05:47:05
Python 埃比 在强大的标准库中找不到典型的python辅助功能集合。 安装 您可以使用以下命令通过pip安装ebbe : pip install ebbe 用法 迭代器功能 实用工具 sorted_uniq 装饰工 decorators.fail_fast decorators.with_defer as_chunks 在对项目进行迭代时,通过对项目进行分组来对所需大小的块进行迭代。 import ebbe list ( ebbe . as_chunks ( 3 , [ 1 , 2 , 3 , 4 , 5 ])) >> > [[ 1 , 2 , 3 ], [ 4 , 5 ]] fail_fast 采取一个可迭代的方法(但是它主要是针对生成器的),并尝试访问第一个值以查看是否会在返回等效的迭代器之前引发Exception。 例如,这对于一些构思不佳的生成器很有用,这些生成器会检查
【文件预览】:
ebbe-master
----.gitignore(108B)
----README.md(8KB)
----.github()
--------workflows()
----test()
--------decorators_test.py(796B)
--------__init__.py(0B)
--------utils_test.py(4KB)
--------iter_test.py(3KB)
----requirements.txt(104B)
----LICENSE.txt(1KB)
----ebbe()
--------utils.py(2KB)
--------__init__.py(442B)
--------decorators.py(816B)
--------iter.py(2KB)
----setup.py(672B)
----Makefile(690B)

网友评论