pyrsistent:适用于Python的PersistentImmutableFunctional数据结构

时间:2021-05-07 22:19:39
【文件属性】:
文件名称:pyrsistent:适用于Python的PersistentImmutableFunctional数据结构
文件大小:122KB
文件格式:ZIP
更新时间:2021-05-07 22:19:39
python immutable functional datastructures Python 耐火的 Pyrsistent是许多持久性集合(被某些人称为功能数据结构)。 从某种意义上说,它们是永久不变的。 数据结构上通常会对其进行突变的所有方法都将返回该结构的新副本,其中包含请求的更新。 原始结构保持不变。 这将简化有关程序功能的推理,因为这些数据结构永远不会发生任何隐藏的副作用。 您可以放心,您所引用的对象将在其整个生命周期中保持不变,并且不必担心在您应用程序最暗的角落中您以下五个堆栈级别的某个位置,有人决定删除您希望存在的那个元素。 Pyrsistent受持久数据结构(例如在Clojure标准库中找到的数据结构)的影响。 数据结构旨在通过路径复制共享公共元素。 它旨在采用这些概念并使它们尽可能地具有Python风格,以便可以轻松将它们轻松集成到任何python程序中。 如果您想全面了解持久性数据结构,并使用文字语法在代码中定义它们而不是函数调用,请查看 。 例子 当前
【文件预览】:
pyrsistent-master
----MANIFEST.in(111B)
----pvectorcmodule.c(50KB)
----README.rst(26KB)
----_pyrsistent_version.py(23B)
----pyrsistent()
--------_precord.py(7KB)
--------_pmap.py(14KB)
--------__init__.pyi(7KB)
--------_toolz.py(3KB)
--------_pset.py(6KB)
--------_field_common.py(11KB)
--------_pbag.py(7KB)
--------_transformations.py(4KB)
--------__init__.py(1KB)
--------_helpers.py(3KB)
--------py.typed(0B)
--------_pvector.py(22KB)
--------typing.pyi(10KB)
--------_checked_types.py(18KB)
--------_plist.py(8KB)
--------_pclass.py(9KB)
--------_immutable.py(3KB)
--------_pdeque.py(12KB)
--------typing.py(2KB)
----requirements.txt(207B)
----.travis.yml(4KB)
----LICENSE.mit(1KB)
----tox.ini(1KB)
----pytest.ini(33B)
----setup.cfg(22B)
----setup.py(3KB)
----Makefile(99B)
----CHANGES.txt(16KB)
----performance_suites()
--------pvector_27.result(1KB)
--------pmap_27.result(914B)
--------pvector.py(6KB)
--------pmap.py(6KB)
----docs()
--------source()
--------make.bat(7KB)
--------Makefile(7KB)
--------.gitignore(8B)
----tests()
--------performance_run.py(9KB)
--------field_test.py(407B)
--------regression_test.py(721B)
--------toolz_test.py(181B)
--------deque_test.py(7KB)
--------hypothesis_vector_test.py(9KB)
--------list_test.py(4KB)
--------transform_test.py(3KB)
--------freeze_test.py(4KB)
--------memory_profiling.py(1KB)
--------record_test.py(24KB)
--------checked_map_test.py(4KB)
--------vector_test.py(20KB)
--------bag_test.py(3KB)
--------checked_set_test.py(2KB)
--------checked_vector_test.py(5KB)
--------immutable_object_test.py(1KB)
--------set_test.py(3KB)
--------class_test.py(11KB)
--------map_test.py(11KB)
----.gitignore(197B)
----README(10B)

网友评论