Tweak to allow for case when weight is explicity None

Yes, I almost did that, but it seemed potentially confusing to someone coming in to maintain

On Jul 25, 2014, at 2:54 PM, chrisndodge <notifications@github.com> wrote:

> In lms/djangoapps/courseware/grades.py:
> 
> > @@ -472,8 +472,9 @@ def get_score(course_id, user, problem_descriptor, module_creator, scores_cache=
> >              return (None, None)
> >  
> >      # Now we re-weight the problem, if specified
> > -    weight = float(problem_descriptor.weight)
> > +    weight = problem_descriptor.weight
> if not going to quibble on python, but can't this be expressed weight = float(problem_descriptor.weight) if problem_descriptor.weight is not None else None.
> 
> This would avoid having this shift of data types from string here to float below.
> 
> Merging anyhow
> 
> —
> Reply to this email directly or view it on GitHub.
>