def container(self, data=None):
if data is None:<EOL><INDENT>data = {}<EOL><DEDENT>root = p = d = {}<EOL>j = <NUM_LIT:0><EOL>k = None<EOL>for k in self:<EOL><INDENT>d[k] = {}<EOL>p = d<EOL>d = d[k]<EOL><DEDENT>if k is not None:<EOL><INDENT>p[k] = data<EOL><DEDENT>return (root, p[k])<EOL>
Creates a dict built from the keys of this namespace

Returns the dict created as well as the tail in a tuple

Example:

    self.value = "a.b.c"

    container, tail = self.container()
    #{"a":{"b":{"c":{}}}, {}

    container, tail = self.container({"d":123})
    #{"a":{"b":{"c":{"d":123}}}, {"d":123}