All pastes #456726 Raw Edit

aib

public python v1 · immutable
#456726 ·published 2007-04-24 23:40 UTC
rendered paste body
# Hey Trevor. Mostly minor bugs throughout the code. For example, /n instead of \n, =+ intead of +=. =+ says, "assign this variable to positive 1"!, but there is still a flow control problem in this statement, which is probably easier for you to find:        i = 0        while i < len(ratings):           j = 0           if ratings[i] == r_g:                while j < 7:                   r_i_list[j] = ratings[i + j + 1]                   j += 1           if ratings[i] == s_i:                while j < 9:                   s_i_list[j] = ratings[i + j + 1]                   j += 1           if ratings[i] == w_u:                while j < 5:                   w_u_list[j] = ratings[i + j + 1]                   j += 1           if ratings[i] == s_b:                while j < 2:                   s_b_list[j] = ratings[i + j + 1]                   j += 1           i += 1# These lists aren't actually being populated. By the time you get to this lineself.parsed_ratings = [r_i_list, s_i_list, w_u_list, s_b_list] # self.parsed_ratings is just an empty list. So by the time you get to this lineself.ratings_dict['Readability Index'] = self.readability_grades(list1[0])# you get an attribute error, because you can't use the find method on nothing# All my code changes are in the repo, under style_wrapper.py. Cheers :)