You're awesome :)


On Sun, Mar 3, 2013 at 7:51 AM, Horst Gutmann <notifications@github.com>wrote:

> In apis/lib/full_source/platform_pricing.py:
>
> > +
> > +            # The moment we reach a new year, we have to reset the CPI data
> > +            # and calculate the average CPI of the current_year.
> > +            if current_year != year:
> > +                if current_year is not None:
> > +                    self.year_cpi[current_year] = sum(year_cpi) / len(year_cpi)
> > +                year_cpi = []
> > +                current_year = year
> > +            year_cpi.append(cpi)
> > +
> > +        # We have to do the calculation once again for the last year in the
> > +        # dataset.
> > +        if current_year is not None and current_year not in self.year_cpi:
> > +            self.year_cpi[current_year] = sum(year_cpi) / len(year_cpi)
> > +
> > +    def get_adapted_price(self, price, year, current_year=None):
>
> Ah, that's what you meant ^_^ The diff shown in the e-mail kind of
> suggested you were talking about the load_from_file method and not the
> get_adapted_price method :-)
>
> Will correct that and look through the code again for any "magic" :-)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/econchick/new-coder/pull/3/files#r3217657>
> .
>