smartinspectpython.siobjectrenderer

Module: siobjectrenderer.py

Revision History

Date Version Description
2023/05/30 3.0.0.0 Initial Version.

@export
class SIObjectRenderer:

Responsible for creating a string representation of any arbitrary object.

This class provides only one method, RenderObject, which is capable of creating a string representation of an object. It renders dictionaries, collections or any other object.

Threadsafety:

The public static members of this class are thread-safe.

SIObjectRenderer()

Initializes a new instance of the class.

@staticmethod
def RenderObject(obj: object) -> str:

Creates a string representation of an object.

Arguments:
  • obj (object): The object to render. Can be null.
Returns:

A string representation of the supplied object.

This method is capable of creating a string representation of an object. For most types this method simply calls the __str__ method of the supplied object. Some objects, like dictionaries or collections, are handled special.