谓词工厂、函数和部分的集合,用于函数式编程。

predicates的Python项目详细描述


谓词工厂、函数和部分的集合,用于 函数式编程。

https://travis-ci.org/agoraplex/predicates.png?branch=masterhttps://coveralls.io/repos/agoraplex/predicates/badge.png?branch=master

predicates模块提供各种谓词谓词 工厂和谓词部分。

“A predicate is a function that returns the truth value of some condition.”

—Andrew M. Kuchling, Python Functional Programming HOWTO

谓词工厂是创建新谓词的函数 基于它们的参数(例如_and_nargs)。谓词 部分是由 谓词的参数。

完整的project documentation可用。项目来源 可在github project page找到。

安装

从pypi安装:

$ pip install predicates

开发人员安装

github repository安装开发版本:

$ git clone https://github.com/agoraplex/predicates.git predicates
$ cd predicates
$ virtualenv-2.7 --no-site-packages venv
$ pip install -e '.[docs,tests]'

注意

请特别注意pip install行。那是一个 句点,后跟[docs,tests][1](它在 单引号以防bash误解 括号)。

使用notests运行测试套件:

$ python setup.py nosetests

使用sphinx生成html文档:

# to build in build/sphinx/html/...:
$ python setup.py build_sphinx

# to build in docs/_build/html/... (which is what I do):
$ make -C docs
[1]Yes, it’s a hack. See the python setup.py develop and extras thread on the python-distutils-sigmailing list).

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java hibernate。MappingException持久类未知   其余的都是java。lang.ClassNotFoundException:雅加达。servlet。在Tomcat 9上运行时在Maven/Jersey web服务上进行筛选   java从异步任务返回结果   java阶乘程序打印出递归   停止或重新部署Spring 3.1.2、Hibernate 4.1.0、Spring DataJpa 1.1.0、Tomcat 7.0.30时出现java内存泄漏   java如何在配置文件中生成计算属性   集合java 8将ListB的所有元素合并到ListA中(如果不存在)   运行mvn verify时,java为'test'配置文件中的测试设置defaultbinder   java如何在Hashmap中删除重复的键值对?不只是复制键或值   java如何编程一个按钮以成功加载数组中的下一个数据   java将ASCII数据发送到Android Things上的UART3,最后是3个字节0xFF   多线程Java并发递增一个值   java Android应用程序登录和登录问题