It is documented package 'pkg_stack' which provides feature 'stack' functionality
Project description
stack_ops package
Author: Suyog K Sethia
I have created documented package 'pkg_stack' which provides feature 'stack' general functionality, with exception handling. I also threw in unittest, which is runnable after installing package, and it checks sanity of package 'pkg_stack'.
Install Package 'pkg_stack' via pip:
pip install pkg-stack-skscodes
To Import Package 'pkg_stack':
import pkg_stack
Find Attributes:
>>>from pkg_stack.mystack import Stack
>>>dir(Stack)
>>>dir(Stack())
Find Help:
>>>help(Stack.from_values)
Help on method from_values in module pkg_stack.mystack:
from_values(*args) method of builtins.type instance
Construct a Stack from given values.
Params:
*args: Integer values to be pushed onto the stack being created.
Returns: The newly created Stack object
>>>help(Stack.pop)
Help on function pop in module pkg_stack.mystack:
pop(self)
Pop a value from the stack.
Returns: The integer value popped from the stack.
Raises:
StackEmptyError: When trying to pop from empty stack.
Example:
>>>from pkg_stack.mystack import Stack
>>>s = Stack.from_values(1,2,3,4)
>>>print(s)
[1, 2, 3, 4]
Exception Handling:
sample case-1:
>>>from pkg_stack.mystack import Stack
>>>s = Stack()
>>>s.pop()
stack is empty.
sample case-2:
>>>s =Stack.from_values(1,2,3,4,5)
>>>s.push(5)
stack is full.
To see full demo of Package 'pkg_stack' operations in video-like manner:
>>>import pkg_stack.mystack
>>>pkg_stack.mystack.main()
demo begins..
..
..
Enjoy!
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 pkg-stack-skscodes-0.0.64.tar.gz.
File metadata
- Download URL: pkg-stack-skscodes-0.0.64.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94de01d732e40cd90fec1d37cb6d8bff4c33f81ad4dfd8b557f37e61382c43ce
|
|
| MD5 |
33cd9e65f9b7b2a50b6f0ffaa0a68c13
|
|
| BLAKE2b-256 |
017ba05896d796a833264b16ca4d5829b3f3b9f3388cb50033efdaa5a61eb7c5
|
File details
Details for the file pkg_stack_skscodes-0.0.64-py3-none-any.whl.
File metadata
- Download URL: pkg_stack_skscodes-0.0.64-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b3f3f4c74e0e56934777065741c2bf9746f8d0eca387b0a6729f3ca13c56618
|
|
| MD5 |
89c8032d3a59fe72163cb978958964bf
|
|
| BLAKE2b-256 |
f30e8f669df6edb1917b84432d0a1b380483bc0a12d856f3f931d44686440f6f
|