Classes to implement algorithms, functional and imperative styles supported.
Project description
PyPI grscheller.datastructures
Data Structures which support the use and implementation of algorithms.
- Functional and imperative programming styles are supported
- Supports functional programming while endeavoring to be Pythonic
- Methods which mutate objects don't return anything
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 data 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 either. 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
as a value is not stored in these data
structures unless specifically documented. Maybe
& Either
classes
are provided in the functional sub-package 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.12.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9a5b9ea820aadc183746e96b1d35344769bd24a75176fcca9abfa6ba773430e |
|
MD5 | a56c52f39cb14e8c3ee86cc5c1bff3b1 |
|
BLAKE2b-256 | e6e433df16d319c7e8d46ac008c6deed7fc6abe55c3a2b63554845e3dde963fe |
Hashes for grscheller_datastructures-0.12.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67648b4d57365ff758b70f52c025c31408fb14f2a664c76519c5ce43db23779f |
|
MD5 | e09d091a35214a28b7d8167580e20184 |
|
BLAKE2b-256 | f54627b35fdbf68f6e3d52b83b44f4055f66080f42522cfe94e37d046ebe342b |