X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=docs%2Fpyutils.collectionz.rst;h=fa609a07664e4538a56c5066d683e70d22aadab0;hb=505e977297f5a81e1039402184f10422f63a140d;hp=c3424503628c6c817a46203a42aefa903851ae4d;hpb=1c60a8d9ae5a162f8d309b48f8a07ee6946f3e25;p=pyutils.git diff --git a/docs/pyutils.collectionz.rst b/docs/pyutils.collectionz.rst index c342450..fa609a0 100644 --- a/docs/pyutils.collectionz.rst +++ b/docs/pyutils.collectionz.rst @@ -1,6 +1,13 @@ pyutils.collectionz package =========================== +This subpackage contains some homegrown collections that try to +emulate :mod:`collections` included in the Python standard library +(see: +https://docs.python.org/3/library/collections.html#module-collections). +It ends with a 'z' so as not to collide with the standard library +package. + Submodules ---------- @@ -8,6 +15,7 @@ pyutils.collectionz.bidict module --------------------------------- .. automodule:: pyutils.collectionz.bidict + :imported-members: :members: :undoc-members: :show-inheritance: @@ -20,9 +28,25 @@ pyutils.collectionz.bst module :undoc-members: :show-inheritance: +pyutils.collectionz.interval\_tree module +----------------------------------------- + +.. automodule:: pyutils.collectionz.interval_tree + :members: + :undoc-members: + :show-inheritance: + pyutils.collectionz.shared\_dict module --------------------------------------- +The shared\_dict.SharedDict class is a normal python dictionary that +can be accessed safely in parallel from multiple threads or processes +without (external) locking by using Multiprocessing.SharedMemory. It +uses internal locking and rewrites the shared memory region as it is +changed so it is slower than a normal dict. It also does not grow +dynamically; the creator of the shared\_dict must declare a maximum +size. + .. automodule:: pyutils.collectionz.shared_dict :members: :undoc-members: