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.tar.gz (11.4 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-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

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

Hashes for python_stl_example-0.0.1.tar.gz
Algorithm Hash digest
SHA256 641189f38b8b1f0290d625c13619dbccb263cf3a6d71549f2c4384e47ad7d177
MD5 14f1725a1cd1d7e278daeea4b7c66992
BLAKE2b-256 9c8378db9822a24b306a41de7047897274a10acca9227ef24f818eaf0061e12d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_stl_example-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 385ce56832fc5da77270f1b0a94a5d2b3f25cfd4500766886603e911ad290139
MD5 f2895dc0b64474e79874e522ece0ed81
BLAKE2b-256 7481200d014981a62b343355a17ea21e056bbda13952927ca0381b0a67bfd49b

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