[Tutor] Writing decorators?

Alan Gauld alan.gauld at yahoo.co.uk
Tue Jul 5 19:24:36 EDT 2016


On 06/07/16 00:06, Alan Gauld via Tutor wrote:

> func = decorator(func)
> 
> If you write @decorator()
> 
> That translates to
> 
> @decorator()(func)

Ooops, I meant to say

func = decorator()(func)

Sorry.
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list