elegant-structure-0.0.1
توضیحات
An elegant structure package
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | elegant-structure-0.0.1 |
| نام | elegant-structure |
| نسخه کتابخانه | 0.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Jiaying Wang |
| ایمیل نویسنده | jiaying@sjzu.edu.cn |
| آدرس صفحه اصلی | https://github.com/jiayingwang/elegant_structure |
| آدرس اینترنتی | https://pypi.org/project/elegant-structure/ |
| مجوز | - |
# Introduction
The elegant-structure module contains data structures to make code more elegant.
# Install
```python
pip install elegant-structure
```
or update
```python
pip install --upgrade elegant-structure
```
# Usage
```python
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)
```
```shell
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

زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl elegant-structure-0.0.1:
pip install elegant-structure-0.0.1.whl
نصب پکیج tar.gz elegant-structure-0.0.1:
pip install elegant-structure-0.0.1.tar.gz