一个小型的纯python包,用于与数据结构相关的实用程序函数。
strct的Python项目详细描述
一个小型的纯python包,用于与数据结构相关的实用程序函数。
fromstrct.dictimportget_nested_val>>>dict_obj={'a':{'b':7}}>>>get_nested_val(('a','b'),dict_obj)7
内容
2 Use
strct分为五个子模块:
2.1 dicts
以各种方式从嵌套的dict获取值;对数值dict的操作;合并、规范化、反转和打印dict(很好地)
2.2 lists
索引和元素移动以保持顺序。
2.4 sortedlists
对sortedcontainers.SortedList对象的操作。
2.5 hash
提供可用于内置数据结构和类型以及任何符合iterable或dict方案的自定义数据结构的跨内核稳定哈希函数。
3 Contributing
包作者和当前维护者是shay palachy(shay.palachy@gmail.com);非常欢迎您向他寻求帮助。捐款是非常受欢迎的。
3.1 Installing for development
克隆:
git clone git@github.com:shaypal5/strct.git
以开发模式安装,测试依赖项:
cd strct pip install -e ".[test]"
3.3 Adding documentation
这个项目是使用numpy docstring conventions来记录的,之所以选择它们,是因为它们可能是最广泛传播的约定,它们都得到了sphinx等常用工具的支持,并产生了人类可读的docstring(当然,在我个人看来)。在记录添加到此项目中的代码时,请遵循these conventions。
4 Credits
由shay palachy创建(shay.palachy@gmail.com)。