A extended STL library
Project description
python_stl_example
一个STL扩展库
Python要求:版本≥3.5.0
安装方法(重点!!!)
- 在cmd中使用
pip install python_stl_example下载安装 - 在PYPI网站中下载:
- 可下载.whl文件,在下载目录的cmd中输入
pip install 文件名.whl安装 - 可下载压缩包,解压后在当前目录的cmd中输入
python setup.py install安装
- 可下载.whl文件,在下载目录的cmd中输入
项目分支
-
vector
- 模拟向量STL结构的
vector,提供类似函数接口。
- 模拟向量STL结构的
-
deque
- 模拟双向队列STL结构的
deque,提供类似函数接口。
- 模拟双向队列STL结构的
-
list
- 模拟单向和双向链表STL结构的
list,提供类似函数接口。
- 模拟单向和双向链表STL结构的
-
set
- 模拟集合STL结构的
set,提供类似函数接口。
- 模拟集合STL结构的
-
stack
- 模拟栈STL结构的
stack,提供类似函数接口。
- 模拟栈STL结构的
异常处理
- 内置
decorate装饰器,为各类函数提供统一的异常处理机制,支持日志记录、异常抑制、返回默认值等功能,增强代码的健壮性。
使用示例
# 栈演示
from python_stl_example import stack
s = stack((1, 2, 3, 4), int)
s.push(5)
print(s.top()) # 输出:5
s.pop()
s.pop()
s.pop()
s.pop()
print(s.top()) # 输出:1
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
python_stl_example-0.0.1.tar.gz
(11.4 kB
view details)
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 python_stl_example-0.0.1.tar.gz.
File metadata
- Download URL: python_stl_example-0.0.1.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
641189f38b8b1f0290d625c13619dbccb263cf3a6d71549f2c4384e47ad7d177
|
|
| MD5 |
14f1725a1cd1d7e278daeea4b7c66992
|
|
| BLAKE2b-256 |
9c8378db9822a24b306a41de7047897274a10acca9227ef24f818eaf0061e12d
|
File details
Details for the file python_stl_example-0.0.1-py3-none-any.whl.
File metadata
- Download URL: python_stl_example-0.0.1-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
385ce56832fc5da77270f1b0a94a5d2b3f25cfd4500766886603e911ad290139
|
|
| MD5 |
f2895dc0b64474e79874e522ece0ed81
|
|
| BLAKE2b-256 |
7481200d014981a62b343355a17ea21e056bbda13952927ca0381b0a67bfd49b
|