Tracing (tracing)¶
Collection of utility functions related to the callstack and traceback.
- pypint.utilities.tracing.func_name(obj=None, *args, **kwargs)[source]¶
Formats the calling functions name.
Formats the calling functions name in the format 'ClassName.FunctionName(): '.
Parameters: obj (object) – Instance of an object the calling function is a member of. Returns: formatted_function_name – Formatted function name of calling function. Return type: str Examples
>>> from pypint.utilities import func_name >>> class MyClass(object): ... def my_func(self): ... print(func_name(self) + "Hello World!") >>> my_obj = MyClass() >>> #my_obj.my_func()