src.pydasa.structs.tools.memory#
Module with utility functions for handling memory allocation in the Data Structures of PyDASA.
IMPORTANT: based on the implementations proposed by the following authors/books:
Algorithms, 4th Edition, Robert Sedgewick and Kevin Wayne.
Data Structure and Algorithms in Python, M.T. Goodrich, R. Tamassia, M.H. Goldwasser.
Functions#
|
mem_slot() is a decorator that converts a class into a dataclass with slots. |
Module Contents#
- src.pydasa.structs.tools.memory.mem_slot(cls)#
mem_slot() is a decorator that converts a class into a dataclass with slots.
- Parameters:
cls (Type[T]) – class to convert into a dataclass with slots.
- Raises:
TypeError – if the cls is not a class type.
RuntimeError – if the Python version is less than 3.10.
- Returns:
A dataclass with slots.
- Return type:
Type[T]