Skip to main content

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

qrcode_for_wechat_official_account

Release files for elegant-structure 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for elegant-structure 0.0.1
File Size Uploaded
elegant_structure-0.0.1.tar.gz 2.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for elegant-structure 0.0.1
File Interpreter ABI Platform
elegant_structure-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.7 kB

Release files / elegant_structure-0.0.1.tar.gz

Download URL elegant_structure-0.0.1.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6882feef99f1dab78bd3bea7e13ff78c394d0be589cca39fba64273fa4bd1fb7
BLAKE2b-256 checksum
How to use checksums
49d518e79e2751674a78ab4499b4431e6dba51be0eea0d3f6af4eda6f43ae666
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / elegant_structure-0.0.1-py3-none-any.whl

Download URL elegant_structure-0.0.1-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c4cdc7dce55ae7d3744a7e91e93c316e555977774b799e7b2c430bb54bc9e5d
BLAKE2b-256 checksum
How to use checksums
2effdada3d5f4f6c91ee02a3a104dba22e1a3703578b906ab1b2e7e3ebf3687b
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page