durusmail: quixote-users: function attributes & PTL
function attributes & PTL
2003-08-28
2003-08-28
function attributes & PTL
A.M. Kuchling
2003-08-28
On Wednesday, August 27, 2003, at 08:19 PM, John Belmonte wrote:
> I would like for Quixote's PTL system to use Python function
> attributes within normal .py files.  For example:
>
>     # html_util.py
>
>     def paragraph(text):
>       '

%s

' % text > > paragraph.ptl = 'html' Unfortunately Python doesn't look at function attributes at all when calling a function; they're intended to let Python code attach properties to functions for the code's own purposes. PTL works by compiling template functions specially, so assigning something to a property won't change the function's behavior. A better course would be to change pydoc and pychecker. --amk
reply