Improving Python (was: Lambda going out of fashion)
Aahz
aahz at pythoncraft.com
Sun Dec 26 11:09:56 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 -- it hides the fact
>that functions are objects, 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).
For me, it works the other way around, but I can see how you perceive it
that way.
>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.
Okay, it wasn't clear in your original post that you're still stuck with
1.5.2. That makes a huge difference in the convenience of newer
features.
>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?
While I'm in complete agreement about the "".join() construct on the
basis of looks, I have come to appreciate the fact that I *never* mess up
the order of arguments any more.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"19. A language that doesn't affect the way you think about programming,
is not worth knowing." --Alan Perlis
More information about the Python-list
mailing list