API References¶
All about concise API references manual for pure-datastructures, with the detail about classes, function, return types, arguments and throwing exception.
procedure_search_obj(**kwargs)¶
- Search any value / elements through List. return
Falseif there's a value otherwise returnTrue. - Throwing
missing {} required positional argumentsif not set the value.
procedure_push(**kwargs)¶
- Set a value through
ListandQueue, like a basic insertion or appending a value. ForOrderedList(), new value didn't stored intemporaryvariables, likewise, forUnorderedList()new value would be stored intemporaryvariables (sinceUnorderedList()is using 0(n) for append a value).
procedure_pop()¶
- Same function like
procedure_push(), the different this will raise anIndexErrorif stack is empty or has no value. Only work in Stack references.
procedure_expand_size()¶
- Expanding or double length of array (formula: array +
None* size of array) . Work in all data structures references. Automatically returnNoneif an array doesn't have a value.
procedure_peek()¶
- Check the top-most of any elements in array.
procedure_enqueue(**kwargs)¶
- Push new object or value to queue.
procedure_dequeue()¶
- Remove first object or value from queue.
- Raise an
IndexErrorif you have not set a value before popped out. As a for concern,dequeueprocess in basicQueueandCircularQueueis different.
is_empty()¶
- Check whether an array does have a value or not. In
StackandQueuecase, will returnFalseif stack/queue is empty and returnTrueif not empty. - For
List, will not return any value exceptNone.
is_full()¶
- Check whether an array does have a value or not. Only available in
StackandQueue, throwing exceptions work out same as likeis_empty().
is_balanced()¶
- Check if an array does have a same balanced through inputted value, available in
StackandQueueonly. Inputted value only works with parenthesis like.
DsIndexError()¶
-
Throwing exception, one of the basic and common error in this package. This will raise if inputted value is attempt to access the outside that index of list. Error message :
Stack / List / Queue is empty, set a value first.
DsPeekIndexError()¶
-
Throwing exception, the difference with
DsIndexError(), it will raise ifprocedure_peek()process didn't find any value from that index of list. Error message :Stack / List / Queue is empty, you either must be popped or not set a value.
DsValueError()¶
-
Throwing exception, that indicates the data-type or value is not correct. Error message :
Value error, either your argument or inputted value is not correct.