A little disappointed so far

Aahz aahz at pythoncraft.com
Sun May 18 21:12:54 EDT 2003


In article <VgVxa.310$%Q2.59 at news-binary.blueyonder.co.uk>,
Graham Nicholls  <graham at rockcons.co.uk> wrote:
>
>Heres a few things:
>1.  Documentation - there are no good, up to date books - "Learning Python"
>is poor, IMO. A little better is  "Programming Python", and better still is
>"Core Python", but this is out of date - just covering 2.0 in an appendix. 

_Python in a Nutshell_ cracked the Amazon top 100, and it even includes
a few bits from the not-yet-released Python 2.3.

>2. Its all just so long winded, especially as a shelltool.  I
>(really) _hate_ to say it, but perl seems so much easier, and more
>practical.  I am not a huge fan of perl, because of its inbuilt
>"obfuscability", but I can quickly get things done, like stripping off
>the pathname of my program, so argv[0] is progname, not ./progname, or
>/usr/local/bin/progname.

Lots of it is your unfamiliarity, I think.  Everything available in Perl
is available in some form within Python's standard library, and once you
know the general layout of the library, you'll probably be able to find
unknown items faster than in Perl.

But yes, for quick'n'dirty shell scripts, Perl will always beat Python.
The question is whether you'll find yourself building personal modules
and building blocks that save you time over the long run.

>3. I loved the idea of indenting code driving the execution, till I wrote a
>bug trying to do i=i+1 at the wrong level.  In C or perl, this would leap
>out at me, but I missed it in python.

Don't use TAB chars and set your width to four spaces.

>A few things seem very hard - so, should I persevere?  I'm reasonably
>smart, and have always been attracted to Python (except in that I
>can't _stand_ Monty Python, and find people who can quote it verbatim
>extremely annoying ;-). I liked the indentation thing, till it bit
>me.  I suppose I could try bigger tabstops.  I like the OO. But it
>just seems too slow, where I picked up perl very quickly.  I get the
>impression I could do "big stuff" with Python, where I wouldn't with
>perl (I'd use C or C++).

You definitely can do big stuff in Python.  Note also that Python is
making inroads as an embedded language in things like Paint Shop Pro, so
it's likely that you'll need to learn Python eventually.

Finally, Python is in many ways an exponential learning environment.
With Perl, learning one bit doesn't help you with the next; Python is
overall more orthogonal and better organized, so you can actually
predict what you need to do once you get beyond the beginning stage
(once you know about isfile(), you can predict the existence of
something called "isdir()" or "isdirectory()").
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"In many ways, it's a dull language, borrowing solid old concepts from
many other languages & styles:  boring syntax, unsurprising semantics,
few automatic coercions, etc etc.  But that's one of the things I like
about it."  --Tim Peters on Python, 16 Sep 93




More information about the Python-list mailing list