An elegant structure package
Project description
Introduction
The elegant-structure module contains data structures to make code more elegant.
Install
pip install elegant-structure
or update
pip install --upgrade elegant-structure
Usage
from elegant_structure import Pool
class Test:
def __init__(self, x, y):
self.x = x
self.y = y
test_pool = Pool(Test, verbose=True)
x = test_pool.add(1, 2)
y = test_pool.add(3, 4)
test_pool.remove(x)
test1 = test_pool[x]
if test1:
print(test1.x, test1.y)
test2 = test_pool[y]
if test2:
print(test2.x, test2.y)
the item is not exist in pool.
3 4
License
elegant-io is a free software. See the file LICENSE for the full text.
Authors
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elegant_structure-0.0.1.tar.gz.
File metadata
- Download URL: elegant_structure-0.0.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6882feef99f1dab78bd3bea7e13ff78c394d0be589cca39fba64273fa4bd1fb7
|
|
| MD5 |
4b862d2d678ba92967e7fdb6a71f8173
|
|
| BLAKE2b-256 |
49d518e79e2751674a78ab4499b4431e6dba51be0eea0d3f6af4eda6f43ae666
|
File details
Details for the file elegant_structure-0.0.1-py3-none-any.whl.
File metadata
- Download URL: elegant_structure-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c4cdc7dce55ae7d3744a7e91e93c316e555977774b799e7b2c430bb54bc9e5d
|
|
| MD5 |
c9f9d5c0aa0a3db7fd8f0f6b6909e97d
|
|
| BLAKE2b-256 |
2effdada3d5f4f6c91ee02a3a104dba22e1a3703578b906ab1b2e7e3ebf3687b
|