There are many, yes. All the versions of all the products will be included.

Most languages don't bother doing the date parsing work if the first condition of an if clause is false. They only proceed to full comprehension up until they find a disqualifying condition.


On May 23, 2013, at 12:31 PM, Peter Bengtsson <notifications@github.com> wrote:

> In crashstats/crashstats/views.py:
> 
> > @@ -467,6 +467,18 @@ def daily(request):
> >              for x in request.currentversions
> >              if x['product'] == params['product'] and x['featured']
> >          ]
> > +    
> > +    data['available_versions'] = []
> > +    now = datetime.datetime.utcnow().date()
> > +    for version in request.currentversions:
> > +        start_date = isodate.parse_date(version['start_date'])
> > +        end_date = isodate.parse_date(version['end_date'])
> > +        if(
> > +           params['product'] == version['product'] and
> Are there many of that are != version['product']? If so, why bother doing the date parsing?
> Perhaps this is better:
> 
> for ....
>     if params['product'] != version['product']:
>         continue
>     start_date = isodate.parse_date(version['start_date'])
>     end_date = isodate.parse_date(version['end_date'])
>     if start_date ...
> —
> Reply to this email directly or view it on GitHub.
>