Newbie ?:A more concise way?
Carel Fellinger
cfelling at iae.nl
Tue Mar 5 10:55:59 EST 2002
Brian <brian at lodoss.org> wrote:
...
> Do you also feel my original code is better in terms of style or would
> it be even better as the more verbose:
> z = []
> for i in xrange(y):
> z.append(MyClass())
I personally like *simple* list comprehensions better.
> OK - now I have another question (and remember I'm new to Python) if
> map and lambda are part of the core language and have well defined
> behavior, why is it that using them is considered bad form? Are they
> just the redheaded step-children of the language, or what? ;-)
lambda and friends were a patch submitted by evil forces that somehow
managed to slip by Guido's otherwise impeccable language designers
instinct, or so some of us believe:)
Atleast I think I've read that Guido regrets adding them.
--
groetjes, carel
More information about the Python-list
mailing list