pyrser/type_system/scope.py
def add(self, it: Signature) -> bool:
        """ Add it to the Set """
        if isinstance(it, Scope):
            it.state = StateScope.EMBEDDED
        txt = it.internal_name()
        it.set_parent(self)
        if self.is_namespace:
            txt = it.internal_name()
        if txt == "":
            txt = '_' + str(len(self._hsig))
        if txt in self._hsig:
            raise KeyError("Already exists %s" % txt)
        self._hsig[txt] = it
        self.__update_count()
        return True
def add(self, it: Signature) -> bool:
        """ Add it to the Set """
        if isinstance(it, Scope):
            it.state = StateScope.EMBEDDED
        txt = it.internal_name()
        it.set_parent(self)
        if self.is_namespace:
            txt = it.internal_name()
        if txt == "":
            txt = '_' + str(len(self._hsig))
        if txt in self._hsig:
            raise KeyError("Already exists %s" % txt)
        self._hsig[txt] = it
        self.__update_count()
        return True
def add ( self , it : Signature ) -> bool : if isinstance ( it , Scope ) : it . state = StateScope . EMBEDDED txt = it . internal_name ( ) it . set_parent ( self ) if self . is_namespace : txt = it . internal_name ( ) if txt == "" : txt = '_' + str ( len ( self . _hsig ) ) if txt in self . _hsig : raise KeyError ( "Already exists %s" % txt ) self . _hsig [ txt ] = it self . __update_count ( ) return True
Add it to the Set
Add it to the Set