def namespace(self):
    'Get namespace of node\n\n        Example:\n            >>> _ = cmds.file(new=True, force=True)\n            >>> node = createNode("transform", name="myNode")\n            >>> node.namespace()\n            u\'\'\n            >>> _ = cmds.namespace(add=":A")\n            >>> _ = cmds.namespace(add=":A:B")\n            >>> node = createNode("transform", name=":A:B:myNode")\n            >>> node.namespace()\n            u\'A:B\'\n\n        '
    name = self._fn.name()
    if (':' in name):
        return name.rsplit(':', 1)[0]
    return type(name)()
Get namespace of node

Example:
    >>> _ = cmds.file(new=True, force=True)
    >>> node = createNode("transform", name="myNode")
    >>> node.namespace()
    u''
    >>> _ = cmds.namespace(add=":A")
    >>> _ = cmds.namespace(add=":A:B")
    >>> node = createNode("transform", name=":A:B:myNode")
    >>> node.namespace()
    u'A:B'
def namespace(self):
    'Get namespace of node\n\n        Example:\n            >>> _ = cmds.file(new=True, force=True)\n            >>> node = createNode("transform", name="myNode")\n            >>> node.namespace()\n            u\'\'\n            >>> _ = cmds.namespace(add=":A")\n            >>> _ = cmds.namespace(add=":A:B")\n            >>> node = createNode("transform", name=":A:B:myNode")\n            >>> node.namespace()\n            u\'A:B\'\n\n        '
    name = self._fn.name()
    if (':' in name):
        return name.rsplit(':', 1)[0]
    return type(name)()