A little disappointed so far

Erik Max Francis max at alcyone.com
Sun May 18 20:46:59 EDT 2003


Graham Nicholls wrote:

> 1.  Documentation - there are no good, up to date books ...

There's really no one to blame for this; published books and references
always lag behind releases.  Quite a few books deal with 2.x features.

> "Learning Python"
> is poor, IMO. A little better is  "Programming Python", ...

Funny, I'd put them in the reverse order (for the first edition of the
latter, anyway; I haven't read the second edition).

> 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. 

Python is deliberately "long winded" in that the primary goal is
clarity, not terseness.  If you're using Python strictly as a shell
tool, yes, it'll be more long winded (though much more powerful) than,
say, a shell.  But it's capable of much more, so judging it solely in
these grounds seems to be missing the mark.

> 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.

There's a function which does this:  os.path.split.

> 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.

This is just a function of your text editor.  Use a good one with a
competent Python mode and you will never have a problem.

> I'm just parsing some options (I don't like getopts, and parsing a
> command
> line ought to be easy).

It seems curious to me that you're ignoring the standard and
extraordinarily simple mechanism of getopt simply so that you can go
through the bother of parsing command lines manually, and then
complaining that Python is "long winded."  Sure, it's long winded if you
try to do everything on your own.

> A few things seem very hard - so, should I persevere?

What things seem very hard?  Chances are if you're doing something that
you think is incredibly difficult, there's either 1. something
preexisting that does it for you or 2. you're approaching the problem
the wrong way.

> So no flames please - enthuse me some more!

It's hard to know how to enthuse you when your complaints are
non-specific and at least partially seem to involve ignoring precisely
the tools made available to you to make your life easier (e.g., getopt).

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ I get my kicks above the wasteline, sunshine
\__/  The American, _Chess_




More information about the Python-list mailing list