Python presentations

88888 Dihedral dihedral88888 at googlemail.com
Wed Sep 19 15:43:57 EDT 2012


andrea crotti於 2012年9月20日星期四UTC+8上午12時42分50秒寫道:
> 2012/9/19 Trent Nelson <trent at snakebite.org>:
> 
> >
> 
> >     FWIW, I gave a presentation on decorators to the New York Python
> 
> >     User Group back in 2008.  Relevant blog post:
> 
> >
> 
> >         http://blogs.onresolve.com/?p=48
> 
> >
> 
> >     There's a link to the PowerPoint presentation I used in the first
> 
> >     paragraph.  It's in .pptx format; let me know if you'd like it in
> 
> >     some other form.
> 
> >
> 
> >     Regards,
> 
> >
> 
> >         Trent.
> 
> 
> 
> 
> 
> Ok thanks a lot, how long did it take for you to present that material?
> 
> 
> 
> Interesting the part about the learning process, I had a similar
> 
> experience, but probably skip this since I only have 30 minutes.
> 
> 
> 
> Another thing which I would skip or only explain how it works are
> 
> parametrized decorators, in the triple-def form they just look to ugly
> 
> to be worth the effort (but at least should be understood).

I think the decorator part is reasonable in testing and prototyping.

Every layor of some decorator just adds more overheads, therefore, 
the syntax sugar of the symbol @ just reminds the programmer the fact.

Acctually writing better wrappers for non-trivial enhancements
to objects or functions should be practiced by professionals.

It is easy to import objects written by others in python. 

It is also user responsible to test and enhance the objects 
from others by decorators, the unittest module, or whatever suitable.


I love to play with functions with a varable representing the time
in writing computer games that emulate  hundreds  to thousands of 
animated obects.












More information about the Python-list mailing list