Decorator syntax

Yawar Amin yawar.amin at
Sat Aug 7 12:28:11 CEST 2004

Christopher T King wrote:
> Another (perhaps better) method of declaring metadata has been previously 
> proposed, that of function attributes:
>  def foo(a,b,c):
>      .accepts = (int,int,list)
>      .author = 'Chris King'

How about

def foo(a, b, c):
     foo.accepts = (int, int, list) = 'Chris King'

Yawar Amin

More information about the Python-list mailing list