> i've been using your tool again. And I randomly found a strange behaviour. > Well, in fact, it is not strange, but unexpected..
> The problem can be summarized by this line of python :
> ''.join([])
> When i compiled it, cython told me : > test.py:1:2: Syntax error in doc string
> Is it a normal behaviour? > I must admit I didn't look for this kind of errors on the whole web but > didn't found it in the first google results.
> Thank you
Hello!
I don't know if you saw this :-°
Nobody answered me, so I guess you didn't.
The problem is that cython doesn't like variables doc strings.
I mean : cython tries to assign the docstring to the related fonction/module instead of ignoring it and assigning None as the docstring like cpython does.
> Le jeudi 30 août 2012 15:57:36 UTC+2, Talanor a écrit :
>> i've been using your tool again. And I randomly found a strange behaviour. >> Well, in fact, it is not strange, but unexpected..
>> The problem can be summarized by this line of python :
>> ''.join([])
>> When i compiled it, cython told me : >> test.py:1:2: Syntax error in doc string
>> Is it a normal behaviour? >> I must admit I didn't look for this kind of errors on the whole web but >> didn't found it in the first google results.
> The problem is that cython doesn't like variables doc strings.
> I mean : cython tries to assign the docstring to the related > fonction/module instead of ignoring it and assigning None as the docstring > like cpython does.
Yes, thanks for the report. Looks like a bug in the parser.
> Talanor, 04.09.2012 20:25:
>> Le jeudi 30 août 2012 15:57:36 UTC+2, Talanor a écrit :
>>> i've been using your tool again. And I randomly found a strange behaviour. >>> Well, in fact, it is not strange, but unexpected..
>>> The problem can be summarized by this line of python :
>>> ''.join([])
>>> When i compiled it, cython told me : >>> test.py:1:2: Syntax error in doc string
>>> Is it a normal behaviour? >>> I must admit I didn't look for this kind of errors on the whole web but >>> didn't found it in the first google results.
>> The problem is that cython doesn't like variables doc strings.
>> I mean : cython tries to assign the docstring to the related >> fonction/module instead of ignoring it and assigning None as the docstring >> like cpython does.
> Yes, thanks for the report. Looks like a bug in the parser.
BTW, it would be cool if you could write up a fix for it and send us a pull
request. Look for "docstring" in Parsing.py.
> Stefan Behnel, 04.09.2012 20:54:
>> Talanor, 04.09.2012 20:25:
>>> Le jeudi 30 août 2012 15:57:36 UTC+2, Talanor a écrit :
>>>> i've been using your tool again. And I randomly found a strange behaviour.
>>>> Well, in fact, it is not strange, but unexpected..
>>>> The problem can be summarized by this line of python :
>>>> ''.join([])
>>>> When i compiled it, cython told me :
>>>> test.py:1:2: Syntax error in doc string
>>>> Is it a normal behaviour?
>>>> I must admit I didn't look for this kind of errors on the whole web but
>>>> didn't found it in the first google results.
>>> The problem is that cython doesn't like variables doc strings.
>>> I mean : cython tries to assign the docstring to the related
>>> fonction/module instead of ignoring it and assigning None as the docstring
>>> like cpython does.
>> Yes, thanks for the report. Looks like a bug in the parser.
> BTW, it would be cool if you could write up a fix for it and send us a pull
> request. Look for "docstring" in Parsing.py.
> Stefan
Ok, i'm on it, i think I have a fix. I'm testing it and i'll send you a pull request when i'm done.
> Stefan Behnel, 04.09.2012 20:54:
>> Talanor, 04.09.2012 20:25:
>>> Le jeudi 30 août 2012 15:57:36 UTC+2, Talanor a écrit :
>>>> i've been using your tool again. And I randomly found a strange behaviour.
>>>> Well, in fact, it is not strange, but unexpected..
>>>> The problem can be summarized by this line of python :
>>>> ''.join([])
>>>> When i compiled it, cython told me :
>>>> test.py:1:2: Syntax error in doc string
>>>> Is it a normal behaviour?
>>>> I must admit I didn't look for this kind of errors on the whole web but
>>>> didn't found it in the first google results.
>>> The problem is that cython doesn't like variables doc strings.
>>> I mean : cython tries to assign the docstring to the related
>>> fonction/module instead of ignoring it and assigning None as the docstring
>>> like cpython does.
>> Yes, thanks for the report. Looks like a bug in the parser.
> BTW, it would be cool if you could write up a fix for it and send us a pull
> request. Look for "docstring" in Parsing.py.
Sorry for the long delay and thanks for insisting. I commented the changes.
I think you're almost there, but the node handling needs to be done
differently.
> Talanor, 22.09.2012 15:45:
>> On 09/04/2012 09:03 PM, Stefan Behnel wrote:
>>> BTW, it would be cool if you could write up a fix for it and send us a pull
>>> request. Look for "docstring" in Parsing.py.
>>> Stefan
>> Hey, may I remind you that I sent a pull request =)
>> Thank you.
> Sorry for the long delay and thanks for insisting. I commented the changes.
> I think you're almost there, but the node handling needs to be done
> differently.
> On 09/22/2012 04:33 PM, Stefan Behnel wrote:
>> Talanor, 22.09.2012 15:45:
>>> On 09/04/2012 09:03 PM, Stefan Behnel wrote:
>>>> BTW, it would be cool if you could write up a fix for it and send >>>> us a pull
>>>> request. Look for "docstring" in Parsing.py.
>>>> Stefan
>>> Hey, may I remind you that I sent a pull request =)
>>> Thank you.
>> Sorry for the long delay and thanks for insisting. I commented the >> changes.
>> I think you're almost there, but the node handling needs to be done
>> differently.
>> Stefan
> Hey,
> is it ok the way I did it?
> thank you.
Hello,
I don't know if you are notified when I push the changes on my branch for the pull request, if you are, please, tell me, I won't mail you anymore about it x)
Rather than introduce a _visit_DocString method that recursively calls
the right super, I might simply write an extract_docstring(node)
method, but that's just a suggestion.
In any case, can you create a new pull request with just this change
in the history? Also, can you add a test?
>>> Sorry for the long delay and thanks for insisting. I commented the
>>> changes.
>>> I think you're almost there, but the node handling needs to be done
>>> differently.
>>> Stefan
>> Hey,
>> is it ok the way I did it?
>> thank you.
> Hello,
> I don't know if you are notified when I push the changes on my branch for
> the pull request, if you are, please, tell me, I won't mail you anymore
> about it x)