durusmail: quixote-users: Re: Documenting PTL
Documenting PTL
2004-07-05
2004-07-05
2004-07-06
2004-07-06
Re: Documenting PTL
2004-07-06
Re: Documenting PTL
Graham Fawcett
2004-07-06
Neil Schemenauer wrote:
> On Mon, Jul 05, 2004 at 11:26:01AM -0400, Graham Fawcett wrote:
>
>>def doc_attr [html] (request):
>>    __doc__ = '''
>>      Syntatically correct Python, just need to bind __doc__
>>        to the function.
>>    '''
>
>
> I like this one best.  I think it's doable as well.
>
>   Neil

If I understand function decoration correctly (I probably don't), then I
imagine that both the __doc__ form and the function-decorator form could
work orthogonally: we could implement both, and either could add the
desired __doc__ attribute to a function.

It seems to me that the benefit of a [doc] function-decorator would be
best realised if [html] and [plain] directives were also function
decorators: since then, perhaps, ptl_compile might no longer be an
import-hook and might instead become a function-decoration module. PTL
could become become valid Python (and could be stored in .py files),
thus providing maximum compatibility with existing documentation tools.

(But I speak of things which I do not fully understand...)

-- Graham


reply