[Edu-sig] Python as a first language for computer scientist

Scott David Daniels Scott.Daniels at Acm.Org
Thu Oct 20 02:23:22 CEST 2005


Kirby Urner wrote:

> Advanced topic:  Sometimes Scott and friends like to add another layer of
> indirection, i.e. have @xxx(args) return a function that *then in turn*
> wraps the following function.

Right.  And, be sure, I believe this technique is only a good idea if it
makes a lot of other code much easier to read.  I understand such code
is usually trickier than useful, but sometimes (and hypertoons was one
of those times) you can _greatly_ simplify a lot of code by having a
single small harder-to-understand section replace a larger structure
of "boilerplate."  My aesthetic is that the code you write should all
"mean" something, and you should get "itchy" when you start a round
of cut-paste-edit.


--Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Edu-sig mailing list