Well ... for what it's worth ... i purchased the
Python Cookbook recently and, where i
find the
Perl and
PHP Cookbooks fun and informative, the
Python Cookbook has been rather dull and tedious. I will say
that i would rather use Python over Perl or C for threads,
but dealing with Python's types is PITA after being spoiled
by Perl. Python's sockets are nice too, as well as Python
GUI's ... but when it comes to CGI, XML, system
administration, databases, and data munging, i think Perl is
the better choice. Still, i recommend the Python Cookbook -
if you have to code Python, it is better to have it than to
not have it. ;)
Re: one-liners - i think that one-liners are a good way to
show a Python programmer why Python takes longer. The idea
of one-liners is that you don't have to save one-liners
somewhere and then search for them later - you write them
on the spot, ad lib. They are true throw-away
scripts, much like Python coders use the command-line
interpreter to test code. The more one-liners you write,
the better you get at coming up with one-liners on the
spot. I'm not saying that one cannot write one-liners in
Python ...
python -c 'print [x for x in ("just","another","python","hacker")]'
but without options like -n, -p, -M, or -a, Python just
doesn't cut the mustard regarding one-liners. Since all
these options do is basically add canned code, the only
reason i can think of why Python does not offer similar
functionality is because the Python camp did not even
know that such functionality is useful and desired.
Now, if i were a manager i would probably choose Python,
but only if my programmers were not skilled enough to use
a powerful and dangerous language like Perl. I was
not ready for Perl until about 4 years after i was
introduced to it, but now there seems to be no going back.
:)
jeffa
L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)