A little disappointed so far

Graham Nicholls graham at rockcons.co.uk
Mon May 19 06:39:44 EDT 2003


Steven Taschuk wrote:

> Quoth Graham Nicholls:
>   [...]
>> 2. Its all just so long winded, especially as a shelltool.  [...]
> 
> Sure Python's long-winded, *as a shell tool*.  That's because it's
> not a shell tool; it's a general-purpose programming language.
> Don't be misled by the phrase "scripting language": sysadmin-type
> scripting is just one (relatively minor, imho) domain in which
> Python can be successfully applied.  It's not really fair to
> expect Python to be as terse as tools specialized for that domain,
> any more than it's fair to expect it to be easy to, say, use sed
> to implement a linked list.
OK, fair enough.
> 
> And terseness is overrated anyway.
Hmmm.  Not sure about that. Terse can often mean "very readable" IME.
> 
>   [...]
>> 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.
> 
> I'm a bit puzzled about what happened here.  A statement was
> misindented and that caused trouble; this much I understand.  But
> how did it escape your attention that it had been misindented, and
> why couldn't, say, a misplaced (or missing) brace in a C program
> escape your attention in the same way?

I find it easy in c to press % and jump to the bottom of a loop.  How can I
do this for Python files.  The increment was a legal, sensible command, but
not indented enough, so the loop 

BTW, why no ++ operator?
> 
>   [...]
>> I'm just parsing some options (I don't like getopts, and parsing a
>> command line ought to be easy).
> 
> Easy, sure, but I've always found parsing command lines to involve
> lots of tedious code.  (Your example doesn't strike me as
> unusually long.)  That's why people write libraries for this
> problem...
I agree, its tedious, but remember, I'm trying to learn the language, so
maybe thats no bad thing...
> 
>> My tabstops are set to 2 in vi - thats what I like - sorry that the
>> editor has expanded the m out to 8 .
> 
> Fwiw, the dominant convention for Python code is to indent by four
> spaces and eschew the tab character.
> 
Hmmm again! I like my tabs.

Graham
-- 
Graham Nicholls
All round good guy.




More information about the Python-list mailing list