Improving Python (was: Lambda going out of fashion)
Just
just at xs4all.nl
Sun Dec 26 10:25:40 EST 2004
In article <mailman.8453.1104070799.5135.python-list at python.org>,
"Fredrik Lundh" <fredrik at pythonware.com> wrote:
> func(*arg) instead of apply() is a step back
Strongly disagree. I find func(*args) much more readable than
apply(func, args).
> -- it hides the fact that functions are objects,
What does this have to do with anything?
> and it confuses the heck out of both C/C++ programmers and
> Python programmers that understand the "def func(*arg)" form, because it
> looks like something it isn't (there's a false symmetry between the call-form
> and the def-form).
What's false about the symmetry?
Call: you supply a sequence of args
Def: you receive a sequence of args
Lovely.
> and I still do enough 1.5.2-programming to use "x = x + y"; when I find
> myself in a situation where my code would benefit a lot from being able to
> write "x += y" instead, I go back and fix the design.
>
> string methods are nice, but nothing groundbreaking, and their niceness is
> almost entirely offset by the horrid "".join(seq) construct that keeps
> popping
> up when people take the "the string module is deprecated" yada yada too
> seriously. and what do the python-devers do? they add a "sum" built-in,
> but no "join"? hello?
That's what you get for unsubscribing ;-)
Just
More information about the Python-list
mailing list