loki.types.module_type

Representation of a module type for module definitions.

Classes

ModuleType([name, module])

Representation of a module definition.

class ModuleType(name=None, module=None)

Bases: DataType

Representation of a module definition.

This serves as a caching mechanism for module definitions in symbol tables.

Parameters:
property name

The name of the module

This looks up the name in the linked module if available, otherwise returns the name stored during instantiation of the ModuleType object.

property module

The Module object represented by this type

If not provided during instantiation or if the underlying weakref is dead, this returns BasicType.DEFERRED.