def insertComments( self, comment = None ):
        """
        Inserts comments into the editor based on the current selection.\
        If no comment string is supplied, then the comment from the language \
        will be used.
        
        :param      comment | <str> || None
        
        :return     <bool> | success
        """
        if ( not comment ):
            lang = self.language()
            if ( lang ):
                comment = lang.lineComment()
        
        if ( not comment ):
            return False
        
        startline, startcol, endline, endcol = self.getSelection()
        line, col = self.getCursorPosition()
        
        for lineno in range(startline, endline+1 ):
            self.setCursorPosition(lineno, 0)
            self.insert(comment)
        
        self.setSelection(startline, startcol, endline, endcol)
        self.setCursorPosition(line, col)
        return True
def insertComments ( self , comment = None ) : if ( not comment ) : lang = self . language ( ) if ( lang ) : comment = lang . lineComment ( ) if ( not comment ) : return False startline , startcol , endline , endcol = self . getSelection ( ) line , col = self . getCursorPosition ( ) for lineno in range ( startline , endline + 1 ) : self . setCursorPosition ( lineno , 0 ) self . insert ( comment ) self . setSelection ( startline , startcol , endline , endcol ) self . setCursorPosition ( line , col ) return True
Inserts comments into the editor based on the current selection.\
        If no comment string is supplied, then the comment from the language \
        will be used.
        
        :param      comment | <str> || None
        
        :return     <bool> | success