Newbie question...

shindich at shindich at
Fri Sep 29 00:38:22 CEST 2000

In article <mailman.970145388.3252.python-list at>,
  =?iso-8859-1?Q?Max_M=F8ller_Rasmussen?= <maxm at> wrote:
> From: shindich at [mailto:shindich at]
> >Huh? Since when do you need to write separate functions for adding
> >numbers and strings in Python? The buty of the language is that you
> >write template-like function easily.
> >The following function will do the job:
> Shure can, but I was not trying to write clever code, I was trying to
> a lesson.
> My experience from my teaching days has shown me that I don't come
> more clearly by showing the answer as a more complicated example than
> one the student allready had trouble understanding.
> If somebody has trouble understanding a problem, split it up in more
> subproblems, don't show what can be done if you allready understand
> problem.
> Lecturing'ly yours - Max M
I wasn't trying to write clever code either. If I were, I would have
written something like:
>>> def foo (**args): return reduce (lambda o1, o2: o1+o2, args.values
>>> foo (ugly='1', bad='2')

Sent via
Before you buy.

More information about the Python-list mailing list