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

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中使用ENUM生成随机数   Spring4REST应用程序使用Java配置(无xml)IllegalArgumentException   java在Jar中加载新的FXML   java无法将字符串转换为long(时间戳)或long转换为字符串   流我如何通过Java中的grpc(如broadcase)将持续响应从服务器发送到客户端?   java类型不匹配:无法从一个连接转换到另一个连接   带有组织名称、用户名和密码的java Spring引导登录页面   java从Android设备向Windows CE设备发送/获取字符串数据?   java Selenium代码在localhost上运行良好,但无法捕获Jenkins上的StaleElementReferenceException   jodatime如何获取与下一个小时、分钟对应的日期时间?   java在一个int数组中,如何返回对应于最低值的索引?   在web3j中,如何为运行时发现的数组类型创建TypeReference?   java如何仅在Spring Security上对特定URL强制使用https?   java如何添加全局动作事件侦听器?