Duncan Booth writes:
> Jussi Piitulainen wrote:
> 
> >> Any tips are welcome.
> > 
> > A double tip:
> > 
> > if (not (0.0 <= should_be_on <= 24.0) or
> >     not (0.0 <= came_on <= 24.0)):
> >    ...
> > 
> Or even:
> 
>     if not (0.0 <= should_be_on <= 24.0 and 0.0 <= came_on <= 24.0):
>         ...

I'd still prefer to split the line, especially considering the fact
that the request was to make the line shorter:

if not (0.0 <= should_be_on <= 24.0 and
        0.0 <= came_on <= 24.0):
   ...
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to