【文件属性】:
文件名称:_.py:下划线 python 和用于链接的包装器
文件大小:15KB
文件格式:ZIP
更新时间:2021-07-07 21:45:00
Python
一个python集合包装类
实现了 underscore.js 功能的一半(集合、数组、对象)
所有内置方法在 _ 对象上仍然可用。
用法和示例
所有(功能)
检查是否所有项目都可以通过func (返回True ) func默认为 bool。 every是all的别名。
@param : function(a) -> bool
@return : bool
_ ([ 1 , 2 , 3 ]). all ( lambda x : x > 0 )
= > True
任何(功能)
检查 self._ 中的任何项目是否可以通过func (返回True )func 默认为 bool。 any是some的别名
@param : function(a) -> bool
@return : bool
_ ([ 1 , 2 , 3 ]). some ( lambda x : x > 2
【文件预览】:
_.py-master
----.gitignore(56B)
----src()
--------underscore.py(23KB)
----readme.py(810B)
----readme.md(13KB)
----test()
--------test_function.py(2KB)
--------test_helper.py(573B)
--------test_number.py(1KB)
--------test_set.py(2KB)
--------__main__.py(918B)
--------test_dict.py(3KB)
--------test_list.py(9KB)