(self)
Returns the alias for this identifier or ``None``.
Returns the alias for this identifier or ``None``.
Returns the alias for this identifier or None .
def get_alias(self):
        """Returns the alias for this identifier or ``None``."""
        kw = self.token_next_match(0, T.Keyword, 'AS')
        if kw is not None:
            alias = self.token_next(self.token_index(kw))
            if alias is None:
                return None
        else:
            next_ = self.token_next_by_instance(0, Identifier)
            if next_ is None:
                return None
            alias = next_
        if isinstance(alias, Identifier):
            return alias.get_name()
        else:
            return alias.to_unicode()
def get_alias ( self ) : kw = self . token_next_match ( 0 , T . Keyword , 'AS' ) if kw is not None : alias = self . token_next ( self . token_index ( kw ) ) if alias is None : return None else : next_ = self . token_next_by_instance ( 0 , Identifier ) if next_ is None : return None alias = next_ if isinstance ( alias , Identifier ) : return alias . get_name ( ) else : return alias . to_unicode ( )