qctrlopencontrols.base package¶
Submodules¶
qctrlopencontrols.base.utils module¶
base.utils¶
-
qctrlopencontrols.base.utils.create_repr_from_attributes(class_instance=None, attributes=None)¶ Returns a string representation of an object
Parameters: - class_instance (object, optional) – The instance of a class (object)l defaults to None
- attributes (list, optional) – A list of string where each entry is the name of the attribute to collect from the class instance.
Returns: A string representing the attributes; If no attribute is provided a constant string is returned ‘No attributes provided for object of class {0.__class__.__name__}”. format(class_instance)’
Return type: str
Raises: ArgumentsValueError– If class name is not a string or any of the attribute name is not string type