def __init__(self, namespace=None):
        """Create the factory, optionally bound to the given namespace.
        
        :param namespace: the namespace URI for any created elements, or `None`
                          for no namespace
        """
        if namespace and not isinstance(namespace, Namespace):
            namespace = Namespace(namespace)
        self.namespace = namespace
dataset/ETHPy150Open timonwong/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/python2/genshi/builder.py/ElementFactory.__init__/original