Reflection — selkie.pyx.reflect

selkie.pyx.reflect.load_module(name)

Load a module, given a fully qualified name. The return value is the module.

selkie.pyx.reflect.import_class(spec)

Import a class, given a fully qualified name.

selkie.pyx.reflect.class_name(cls)

The fully qualified name for a given class object.

class selkie.pyx.reflect.FunctionInfo(fnc, ismethod=False)

Instantiation: FunctionInfo(fnc). The argument is a function object (not a name). The FunctionInfo object has the attributes:

  • function — the function object

  • args — a list of parameter names (positional arguments)

  • kwargs — a list of (key, default) pairs

  • doc — the docstring

selkie.pyx.reflect.MethodInfo(method)

Like FunctionInfo, but takes a method.