[EMAIL PROTECTED] wrote:
> I get a syntax error in  :
> 
>  py> [(min((abs(p - v), v) for v in valleys + [0] if v < p)[1],
> ...   p,
> ...   min((abs(p - v), v) for v in valleys if v > p)[1])
> ...  for p in peaks]

I think we already covered the part where you were using an older 
version of Python.  In this case, the missing feature is "generator 
expressions" and they are inside the two min() calls.

You might want to consider upgrading...

-Peter
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to