On Fri, Nov 7, 2014 at 5:16 AM, Veek M <vek.m1...@gmail.com> wrote: > def jump_to_blockD(self): > end = len(self.b) > row, col = self.w.cursor > while row <= end: > try: > new_col = self.b[row].index('def') > self.w.cursor = row, new_col > break > except ValueError: > pass > row += 1 > > def jump_to_blockU(self): > end = 0 > row, col = self.w.cursor > while row >= end: > try: > new_col = self.b[row].rindex('def') > self.w.cursor = row, new_col > break > except ValueError: > pass > row -= 1 > > > > -- > https://mail.python.org/mailman/listinfo/python-list
add a direction parameter to the call, and test direction to change the while test, and row increment/decrement -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list