Classes to implement algorithms, functional and imperative styles supported.
Project description
PyPI grscheller.datastructures Project
Python package of data structures which support the use and implementation of algorithms.
- Functional & imperative programming styles supported
- FP supported but project endeavors to remain Pythonic
- Methods which mutate objects don't return anything
- grscheller.circular-array project on PyPI
- Detailed API documentation on GH-Pages
- Source code on GitHub
Overview
The data structures in this package allow developers to focus on the algorithms they are using instead of all the "bit fiddling" required to implement behaviors, perform memory management, and handle edge cases needed if Python builtin types were used instead. These data structures allow iterators to leisurely iterate over inaccessible copies of internal state while the data stuctures themselves safely mutate. Some of these data structures allow data to be safely shared between multiple data structure instances by making shared data immutable and inaccessible to client code.
This package does not force functional programming paradigms on client code, but provide functional tools to opt into. It also does not force unnecessary exception driven code paths upon client code. Purity is important, but not at the expense of practicality. Sometimes the real power of a data structure comes not from what it empowers you to do, but from what it prevents you from doing to yourself.
As a design choice, Python None
is semantically used by this package
to indicate the absence of a value. While still freely used as an
implementation detail, None
values are not stored in these data
structures. Functional Maybe
and Either
classes are provided in the
core.fp sub-module as better ways to handle "missing" data.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for grscheller_datastructures-0.13.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed62b1108555feba17f486147bc7a37a9fdc364f4f2b810a76baf7b0bb7644d0 |
|
MD5 | c66f183b0c847317c03fadf44c2bc101 |
|
BLAKE2b-256 | f70badbb822777c75c067eafc042d5e681425231d31046c92373728b903ade6c |
Hashes for grscheller_datastructures-0.13.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19ea089a9059f8e1041b6f65644229eca1a046f2d0c92089ab2b6987f838bfdb |
|
MD5 | 8c8b112750c46a6ec1259763040f8ff9 |
|
BLAKE2b-256 | c4526008d217048390a270b96a14b717b064988fab368468166d42f846c90ef2 |