There's no real downside to providing the zero.  It's just an obvious
default value that can be omitted.  You wouldn't write xrange(0,
len(submission_ids), 1), the step is obviously 1.  By the same logic, the
start is obviously 0.


On Thu, Aug 22, 2013 at 4:55 PM, Vik Paruchuri <notifications@github.com>wrote:

> In peer_grading/peer_grading_util.py:
>
> > -
> > -                        #Insert timing initialization code
> > -                        if fallback_sub_id is None:
> > -                            fallback_sub_id = grade_item.id
> > -
> > -                        if not student_profile_success:
> > -                            initialize_timing(sub_id)
> > +            submission_grader_counts = [p['num_graders'] for p in submissions_to_grade]
> > +
> > +            submission_ids = [p['id'] for p in submissions_to_grade]
> > +
> > +            student_profile_success, profile_dict = utilize_student_metrics.get_student_profile(self.student_id, course_id)
> > +            #Ensure that student hasn't graded this submission before!
> > +            #Also ensures that all submissions are searched through if student has graded the minimum one
> > +            fallback_sub_id = None
> > +            for i in xrange(0, len(submission_ids)):
>
> I like the 0 just because it is explicit in what it is looping from. I'll
> change it, but are there any non-nice syntax reasons to avoid the 0?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-ora/pull/130/files#r5936666>
> .
>