W liście Mike Orr z dnia sobota 19 grudnia 2009:
> On Sat, Dec 19, 2009 at 7:55 AM, Graham Higgins <[email protected]> wrote:
> > "A decorator is a Python object that can be called with a single
> > argument and which modifies a function or a method."
> 
> "wraps" would be a better term.  The decorator wraps the original
> function in another function, which can do preprocessing,
> postprocessing, or even not call the original function if it chooses.
> 
Not strictly correct. There are decorators (eg. CherryPy's @expose) that 
return the same function they received, just with additional attributes. So no 
wrapping occurs.

-- 
Paweł Stradomski

--

You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


Reply via email to