Skip to main content

get_obj_slang

FunctionSource

v_1: str = get_obj_slang(obj: Any, skip_root_module: bool = True)

Get the full slang of a function/class/variable in a module.

[!warning] Note that the efficiency of this method is low when the inspected object is not a function/class. When inspecting all members in a module, it is better using get_member_slangs(...).

Arguments

Requires

NameTypeRequired
Description
objAnyThe object to be inspected.
skip_root_moduleboolA flag. If specified, will skip the root module in the slang.

Returns

NameType
Description
v_1str

The slang string of the inspected object.

If the slang refers to the root of the package, return ".".

If the slang cannot be analyzed, return an empty string.