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)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.