Skip to main content

A extended STL library

Project description

python_stl_example

一个STL扩展库

Python要求:版本≥3.5.0

安装方法(重点!!!)

  1. 在cmd中使用pip install python_stl_example下载安装
  2. 在PYPI网站中下载:
    • 可下载.whl文件,在下载目录的cmd中输入pip install 文件名.whl安装
    • 可下载压缩包,解压后在当前目录的cmd中输入python setup.py install安装

项目分支

  1. vector

    • 模拟向量STL结构的vector,提供类似函数接口。
  2. deque

    • 模拟双向队列STL结构的deque,提供类似函数接口。
  3. list

    • 模拟单向和双向链表STL结构的list,提供类似函数接口。
  4. set

    • 模拟集合STL结构的set,提供类似函数接口。
  5. stack

    • 模拟栈STL结构的stack,提供类似函数接口。

异常处理

  • 内置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


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.post2.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_stl_example-0.0.1.post2-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file python_stl_example-0.0.1.post2.tar.gz.

File metadata

File hashes

Hashes for python_stl_example-0.0.1.post2.tar.gz
Algorithm Hash digest
SHA256 2fdb6f0cba40949fa730d59596398f18e91f57847ea44cbd589117a5e5e488d7
MD5 836a349fca5954ef4984251af00a7320
BLAKE2b-256 5bb55c753a70973223f991943af0381a858893d41e23f7f6f90cfc9ac87f5efb

See more details on using hashes here.

File details

Details for the file python_stl_example-0.0.1.post2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_stl_example-0.0.1.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 c6a98a9dda1eec1bc2d72f4e310120b642809405ae45ccd99cbfad3548c1449e
MD5 b2c9f20e01bbd45b0e4737b3e9978031
BLAKE2b-256 8359813e3338aeb8d8019704ccc4bc494f7380d82687fdf24f69c5212fb062c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page