jacinle.utils.inspect#

Functions

bind_args(sig, *args, **kwargs)

Bind arguments to a signature.

class_name(instance_or_class)

Get the class name of an instance or a class object.

class_name_of_method(method)

Get the class name of a method.

func_name(func)

Get a full name of a function, including the module name.

get_subclasses(cls)

Get all subclasses of a class.

method_name(method)

Get a full name of a method, including the module name and the class name.

Functions

bind_args(sig, *args, **kwargs)[source]#

Bind arguments to a signature.

class_name(instance_or_class)[source]#

Get the class name of an instance or a class object.

Parameters:

instance_or_class (Any) – an instance or a class object.

Returns:

the class name of the instance or the class object.

Return type:

str

class_name_of_method(method)[source]#

Get the class name of a method.

Parameters:

method (Callable)

Return type:

str

func_name(func)[source]#

Get a full name of a function, including the module name.

Parameters:

func (Callable) – a function.

Returns:

the full name of the function.

Return type:

str

get_subclasses(cls)[source]#

Get all subclasses of a class.

Parameters:

cls (type)

Return type:

Iterable[type]

method_name(method)[source]#

Get a full name of a method, including the module name and the class name.

Parameters:

method (Callable)

Return type:

str