[Cython] Two generators in one function

2013-02-04 Thread David Roe
Hi everyone, I ran into the following problem using Cython 0.17.4 (current version of Sage). If you try to compile a file with the following function in it: def test_double_gen(L): a = all(x != 0 for x in L) b = all(x != 1 for x in L) return a and b you get errors from the Cython com

Re: [Cython] [cython-users] Recommendations for efficient typed arrays in Cython?

2013-02-04 Thread Greg Ewing
Sturla Molden wrote: I was replying to a Cython user who thought anything declared 'cdef' was reference counted That's a matter of user education. We can't use syntax to address every possible misconception a user might have. "cdef" refers to storage in the generated C, not to the semantics of

Re: [Cython] [cython-users] Recommendations for efficient typed arrays in Cython?

2013-02-04 Thread Robert Bradshaw
On Mon, Feb 4, 2013 at 4:12 AM, Sturla Molden wrote: > On 02.02.2013 01:23, Greg Ewing wrote: > >> If you're suggesting that 'def object foo' should give Python >> reference semantics and 'cdef object foo' raw C pointer >> semantics, > > > No I was not. > > I was suggesting that static declaration

Re: [Cython] [cython-users] Recommendations for efficient typed arrays in Cython?

2013-02-04 Thread Sturla Molden
On 02.02.2013 01:23, Greg Ewing wrote: If you're suggesting that 'def object foo' should give Python reference semantics and 'cdef object foo' raw C pointer semantics, No I was not. I was suggesting that static declarations of Python and C variables should have different keywords. Because