def load(self, name):
        """Construct an object from a registered factory.

        Parameters
        ----------
        name : str
            Name with which the factory was registered.
        """
        try:
            return self._factories[name]()
        except KeyError:
            raise ValueError(
                "no %s factory registered under name %r, options are: %r" %
                (self.interface.__name__, name, sorted(self._factories)),
            )
def load ( self , name ) : try : return self . _factories [ name ] ( ) except KeyError : raise ValueError ( "no %s factory registered under name %r, options are: %r" % ( self . interface . __name__ , name , sorted ( self . _factories ) ) , )
Construct an object from a registered factory.

        Parameters
        ----------
        name : str
            Name with which the factory was registered.