From: Kirby Urner <[EMAIL PROTECTED]>
> @simpson
> def g(x):  return x*x
> 
> >>> g(0, 3)  
> 9.0000000000000036

My resistance to decorators is not unrelated to the fact that I don't seem 
capable of getting my mind around them.

I do find it quite disconcerting that the arguments "g" is expecting
cannot be ascertained in the normal manner - that is by looking 
at "g" for the arguments it is expecting.  Ouch, ouch, ouch.

I think decorators are a little *too* cool - though do accept they have there 
real world uses.  

I am not sure why these are them.

And certainly my issue is unrelated to the particular 
choice of syntax Guido made - which I happen to like, but probably for
the wrong reasons.

I *particularly* dislike decorators in the context of teaching/learning.  

Something that is relatively straight forward as executable pseudo-code
becomes fancy/schmancy programming.

I would probably introduce them first a step or two before metaclasses - 
in the Python for gurus class.

Art 



_______________________________________________
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig

Reply via email to