@decorator syntax is sugar, but for what exactly?

Tristan Seligmann mithrandi at mithrandi.za.net
Sun Aug 8 02:00:41 CEST 2004


On Sat, Aug 07, 2004 at 23:50:47 +0000, Bengt Richter wrote:

The code:

>     @limited_expression_producing_function
>     @another
>     def func(): pass
> 

is equivalent to:

def func(): pass
func = limited_expression_producing_function(another(func))
-- 
mithrandi, i Ainil en-Balandor, a faer Ambar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20040808/15577031/attachment.sig>


More information about the Python-list mailing list