A little disappointed so far

Steven Taschuk staschuk at telusplanet.net
Mon May 19 15:52:30 EDT 2003


Quoth Graham Nicholls:
> Steven Taschuk wrote:
  [...]
> > And terseness is overrated anyway.
>
> Hmmm.  Not sure about that. Terse can often mean "very readable" IME.

I agree, but I also believe that terseness can be pursued
overzealously, to the detriment of readability.  (Note that I
wrote it's overrated, not that it's bad.)

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

I think I'm missing some of this paragraph, and remain puzzled
about how the bug arose (and why the situation is different for C,
for example).

Getting % (or other key) to do what you want is surely just a
matter of editor configuration.

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

Yes.

Perhaps I misunderstood your point above.  I thought you were
saying, "Command-line parsing should be easy, but look how verbose
it is in Python!", to which I reply that command-line parsing is
always verbose, and so this cannot to be blamed on any putative
long-windedness of Python.

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

*shrug*  There is another convention which uses tabs -- and *only*
tabs -- for indentation.  Perhaps the only thing that everyone
agrees on is that mixing tabs and spaces leads to chaos.

-- 
Steven Taschuk                                     staschuk at telusplanet.net
Receive them ignorant; dispatch them confused.  (Weschler's Teaching Motto)





More information about the Python-list mailing list