Lisandro Dalcin wrote:
> On Fri, Jul 24, 2009 at 11:40 PM, Jason
> Grout<[email protected]> wrote:
>> Not if you use comprehension-like syntax.  Can Cython support that in
>> the same way it supports list/set/dict comprehensions?
>>
>> Note that in lots of cases, having any/all only support lists kind of
>> defeats the purpose of the short-cutting.
>>
>> {{{id=0|
>> %cython
>> print all(i>=0 for i in range(10))
>> print any(i<0 for i in range(10))
>> ///
>>
> 
> Wait a minute... this does not have nothing to do with any/all. For
> this to work, Cython have to support GENERATORS...


Okay.  I was hoping that supporting

all(i>=0 for i in range(10))

would be similar to how Cython currently supports

[i>=0 for i in range(10)]


I realize that generators have been a long-requested feature in Cython. 
  To be honest, I was surprised that list/set/dict comprehensions 
worked.    I was hoping it was a small step from there to supporting any 
and all statements like the above.

However, I also really don't know what I'm talking about, so if the 
above doesn't make sense, sorry.

Thanks,

Jason

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to