traits.interface_checker Module

An attempt at type-safe casting.

Classes

class traits.interface_checker.InterfaceError[source]

The exception raised if a class does not really implement an interface.

class traits.interface_checker.InterfaceChecker[source]

Checks that interfaces are actually implemented.

check_implements(cls, interfaces, error_mode)[source]

Checks that the class implements the specified interfaces.

‘interfaces’ can be a single interface or a list of interfaces.

Function

traits.interface_checker.check_implements(cls, interfaces, error_mode=0)[source]

Checks that the class implements the specified interfaces.

‘interfaces’ can be a single interface or a list of interfaces.