(self, fromline, toline)
return startpos, afterpos, deleteable, beyond
Find code positions for line range.
Find code positions for line range.
Find code positions for line range .
def find_pos_line_dict(self, fromline, toline):
        """Find code positions for line range."""
        deleteable = [ num for num in self.line_numbers if num >= fromline and num <= toline ]
        beyond = [num for num in self.line_numbers if num > toline ]
        # find lowest number strictly above range
        afterpos = self.line_numbers[min(beyond)]
        # find lowest number within range
        try:
            startpos = self.line_numbers[min(deleteable)]
        except ValueError:
            startpos = afterpos
        return startpos, afterpos, deleteable, beyond
def find_pos_line_dict ( self , fromline , toline ) : deleteable = [ num for num in self . line_numbers if num >= fromline and num <= toline ] beyond = [ num for num in self . line_numbers if num > toline ] # find lowest number strictly above range afterpos = self . line_numbers [ min ( beyond ) ] # find lowest number within range try : startpos = self . line_numbers [ min ( deleteable ) ] except ValueError : startpos = afterpos return startpos , afterpos , deleteable , beyond