[Cython] Possible bug when using cython -Wextra

2013-02-07 Thread Samuele Kaplun
Hello, I am not sure if this is a bug or it is the intended behaviour, however, consider for example this snippet: [...] def test(): cdef int i for i from 0 <= i < 10: print "foo" [...] If I save it into x.pyx and compile it with: $ cython -Wextra x.pyx I obtain the warning: [

Re: [Cython] Possible bug when using cython -Wextra

2013-02-07 Thread Stefan Behnel
Samuele Kaplun, 07.02.2013 10:16: > I am not sure if this is a bug or it is the intended behaviour, however, > consider for example this snippet: > > [...] > def test(): > cdef int i > for i from 0 <= i < 10: > print "foo" > [...] > > If I save it into x.pyx and compile it with:

Re: [Cython] Possible bug when using cython -Wextra

2013-02-07 Thread Samuele Kaplun
Dear Stefan, In data giovedì 7 febbraio 2013 12:11:47, Stefan Behnel ha scritto: > > [...] > > > > def test(): > > cdef int i > > > > for i from 0 <= i < 10: > > print "foo" > > > > [...] > > Yes, it actually is an unused variable in your code. There is no reference > to it

[Cython] analyse_types() refactoring

2013-02-07 Thread Stefan Behnel
Hi, I finally found the time to refactor the analysis phase. https://github.com/cython/cython/commit/f9c385e08401ed96b5b0afb8411480037dc772b9 The methods now return a node, which allows them to replace themselves with a different implementation. Note that the relatively large code impact of thi

Re: [Cython] analyse_types() refactoring

2013-02-07 Thread mark florisson
On 7 February 2013 11:32, Stefan Behnel wrote: > Hi, > > I finally found the time to refactor the analysis phase. > > https://github.com/cython/cython/commit/f9c385e08401ed96b5b0afb8411480037dc772b9 > > The methods now return a node, which allows them to replace themselves with > a different imple

Re: [Cython] analyse_types() refactoring

2013-02-07 Thread Stefan Behnel
mark florisson, 07.02.2013 18:46: > On 7 February 2013 11:32, Stefan Behnel wrote: >> I finally found the time to refactor the analysis phase. >> >> https://github.com/cython/cython/commit/f9c385e08401ed96b5b0afb8411480037dc772b9 >> >> The methods now return a node, which allows them to replace the

Re: [Cython] Possible bug when using cython -Wextra

2013-02-07 Thread Stefan Behnel
Samuele Kaplun, 07.02.2013 13:00: > In data giovedì 7 febbraio 2013 12:11:47, Stefan Behnel ha scritto: >>> [...] >>> >>> def test(): >>> cdef int i >>> >>> for i from 0 <= i < 10: >>> print "foo" >>> >>> [...] >> >> Yes, it actually is an unused variable in your code. There is

Re: [Cython] analyse_types() refactoring

2013-02-07 Thread Dag Sverre Seljebotn
On 02/07/2013 06:32 PM, Stefan Behnel wrote: Hi, I finally found the time to refactor the analysis phase. https://github.com/cython/cython/commit/f9c385e08401ed96b5b0afb8411480037dc772b9 The methods now return a node, which allows them to replace themselves with a different implementation. No

[Cython] Keyword arguments for cdef functions and call for a little help

2013-02-07 Thread Stefan Behnel
Hi, in the current master branch, I implemented support for passing keyword arguments into cdef functions. The names are mapped statically at compile time to the names declared in the signature. This means that you can now do this: cdef func(int x, bint flag): pass func(1, flag=T