(self, namespace, identifier, obj)
Add an identifier to this name scope.

    Args:
      namespace: A string specifying the namespace to which the
        identifier belongs.
      identifier: The identifier string.
      obj: The object referred to by the identifier.

    Raises:
      ValueError: If `identifier` not valid.
Add an identifier to this name scope.
Add an identifier to this name scope .
def add(self, namespace, identifier, obj):
    """Add an identifier to this name scope.

    Args:
      namespace: A string specifying the namespace to which the
        identifier belongs.
      identifier: The identifier string.
      obj: The object referred to by the identifier.

    Raises:
      ValueError: If `identifier` not valid.
    """
    namespace_dict = self._namespaces[namespace]
    if identifier in namespace_dict:
      raise ValueError('Duplicated identifier {!r} in namespace <{}>'
                       .format(identifier, namespace))
    else:
      self._assign(namespace, identifier, obj)
    self.increment_revision()
def add ( self , namespace , identifier , obj ) : namespace_dict = self . _namespaces [ namespace ] if identifier in namespace_dict : raise ValueError ( 'Duplicated identifier {!r} in namespace <{}>' . format ( identifier , namespace ) ) else : self . _assign ( namespace , identifier , obj ) self . increment_revision ( )