Skip to content

Commit

Permalink
slightly more efficient and cleaner __unicode__
Browse files Browse the repository at this point in the history
  • Loading branch information
jbau committed Mar 22, 2013
1 parent 8872e06 commit b4e9c90
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions main/courses/exams/autograder.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ class AutoGrader():
__false_default = {'correct':False, 'score':0}

def __unicode__(self):
graders=[]
points = []
for k,v in self.grader_functions.iteritems():
graders.append(k)
graders=self.grader_functions.keys()
graders = sorted(graders)
return "AutoGrader functions set up for the following response names:\n" + \
"\n".join(map(lambda gname: "name: %s | points: %1.2f" % (gname, self.points_dict[gname]), graders))
Expand Down

0 comments on commit b4e9c90

Please sign in to comment.