On Oct 17, 2008, at 8:14 AM, Lisandro Dalcin wrote:

> OK, I've opened a new ticket (#104) in track.
> http://trac.cython.org/cython_trac/ticket/104
>
> If there are no objections, I'll push the patch an close the ticket.

Yes, please do. Did you open a ticket for the unused variables warnings?

>
>
>
>
> On Thu, Oct 16, 2008 at 4:29 PM, Dag Sverre Seljebotn
> <[EMAIL PROTECTED]> wrote:
>> Lisandro wrote:
>>> Then my patch will fix test cases like the above as follow:
>>>
>>> cdef void foo():
>>>    int var1, var2=0
>>>    var1 = var2
>>>
>>> foo()
>>>
>>> Note that I'm just initializing 'var2' and using 'foo'. Do you  
>>> see any
>>> drawback about that?
>>
>> Well, there are drawbacks, but I'm getting less worried about how  
>> serious
>> they are.
>>
>> But I'll just explain the drawbacks for the sake of the  
>> explanation. We
>> just had a severe bug espace our attention for months (and which you
>> found) because
>>
>> """
>> cdef object unused
>> """
>>
>> was not a testcase. Now
>>
>> """
>> cdef object unusded = 3
>> """
>>
>> would not have helped -- in fact this is an entirely different  
>> testcase!
>> The latter one makes "entry.used" be set differently and would  
>> trigger
>> entirely different paths through the code in Cython.
>>
>> Now, local variables are a different matter. In fact, I don't know  
>> how
>> they work myself. I just know that if they are initialized, the  
>> testcase
>> tests something else than what it originally tested -- some if-tests
>> within Cython (concerning entry.used and so on) may start taking  
>> another
>> route, and perhaps some code blocks are then left untested.
>>
>> But this can be countered by creating a new testcase specifically  
>> targeted
>> for covering what you now remove, so I'm getting more friendly  
>> towards
>> your patch.
>>
>> Dag Sverre
>>
>> _______________________________________________
>> Cython-dev mailing list
>> [email protected]
>> http://codespeak.net/mailman/listinfo/cython-dev
>>
>
>
>
> -- 
> Lisandro Dalcín
> ---------------
> Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
> Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
> PTLC - Güemes 3450, (3000) Santa Fe, Argentina
> Tel/Fax: +54-(0)342-451.1594
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev

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

Reply via email to