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
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.post2.tar.gz.
File metadata
- Download URL: python_stl_example-0.0.1.post2.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fdb6f0cba40949fa730d59596398f18e91f57847ea44cbd589117a5e5e488d7
|
|
| MD5 |
836a349fca5954ef4984251af00a7320
|
|
| BLAKE2b-256 |
5bb55c753a70973223f991943af0381a858893d41e23f7f6f90cfc9ac87f5efb
|
File details
Details for the file python_stl_example-0.0.1.post2-py3-none-any.whl.
File metadata
- Download URL: python_stl_example-0.0.1.post2-py3-none-any.whl
- Upload date:
- Size: 15.5 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 |
c6a98a9dda1eec1bc2d72f4e310120b642809405ae45ccd99cbfad3548c1449e
|
|
| MD5 |
b2c9f20e01bbd45b0e4737b3e9978031
|
|
| BLAKE2b-256 |
8359813e3338aeb8d8019704ccc4bc494f7380d82687fdf24f69c5212fb062c6
|