Lisandro Dalcin wrote:
> On Wed, Sep 17, 2008 at 4:54 PM, Dag Sverre Seljebotn
> <[EMAIL PROTECTED]> wrote:
>   
>> Lisandro wrote:
>>     
>>> I've almost finished the transform in charge of embeding functions
>>> signatures in docstrings. I want to ask your about some issues I need
>>> to handle to finish it.
>>>
>>> * Position in the transform pipeline: I'm curently inserting the
>>> auto-signature transform after the 'ResolveOptions' one in the
>>> transform pipeline. Dag, tell me if this is OK.
>>>       
>> For this, anywhere where you have the needed information available is ok.
>> I guess you read the type info from nodes then, and not the "parsed" info
>> that is available later? (that could make sense and is not necesarrily a
>> bad sign)
>>
>>     
>
> I did not understand you here, but anyway it seems to work at the
> place I'm inserting it. Or perhaps I could get more info (like return
> type in 'cpdef' funcions) if I insert the transform near the end?
>   
Sorry, my fault. Basically, when I wrote my description I meant to imply 
(and should have clarified better) that the AnalyseDeclarationsTransform 
interprets the nodes containing the type declarations into a purer 
Python representation (see PyrexTypes.py). However for what you are 
doing, walking the CSimpleTypeNodes might be just as good.

(Inserting the transform after AnalyseDeclarationsTransform makes 
certain things

The end of the story is: If things work, then the position you picked is 
fine! And as for the return type of cpdef functions, it seems like the 
information you need is in the "base_type" attribute of CFuncDefNode.

One thing I thought about for compiler directives vs. command line 
options: I am now +1 for a directive! Reason: Whether or not you want 
this auto-generated line in your docstrings is tightly connected with 
the source code you write, so it makes sense that it can be controlled using

#cython: autofunctiondoc=True

in the beginning of the file. (If you want we can disable decorator and 
with statement usage of this directive, though it doesn't really hurt to 
leave it in even if nobody would use it?) I.e. if you write your 
signatures in the docstrings yourself you would want to turn it off in 
the same source file, and so on.


> Perhaps in the near future we can ask the Epydoc developer so suport
> Cython.  But we should ship a tool with Cython for the moment.
>   
I guess you can just stick it in the Tools subdirectory.

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

Reply via email to