A modest indentation proposal

Chris Barker chrishbarker at attbi.com
Mon Dec 3 22:38:48 CET 2001


Erann Gat wrote:
> In article <3C0BBC1A.6E4154F at home.net>, Chris Barker
> <chrishbarker at home.net> wrote:

> > I if get this straight, you seem to think that the indentation issue is
> > the ONLY thing getting in the way of NASA adopting Python.  The only
> > "show stopper" at any rate.

> No, that is not the case.  In fact, you seem to have made this up out of
> whole cloth.

I may have misinterpretted, but:
Erann Gat wrote:
> Fortunately, in this case the
> list of nit-pick issues seems to be rather short.  There's not a whole
> laundry list of issues, just this one.  Unfortunately, it seems to be a
> potential show stopper.

I wouldn't call that whole cloth, I would call it a quotation. 
 
> > By the way, did you suggest to the LISP community that LISP should
> > optionally use something other than all those parentheses? That seems to
> > be the main unimportant stumbling block when people used to C/C++
> > consider LISP.
> 
> Yes, as a matter of fact I did.  I even implemented it (it's easy to do
> within standard Lisp), as have dozens of other people.  The only reason I
> haven't implement this suggestion myself is that I don't know how.

All you need is a pre-processor. With the tokenize module, it would be
pretty easy to write one in Python. Or use pyindent, and modify it for
your desires. By the way, check out this from the pindent header:

# Secret feature:
# - On input, a block may also be closed with an "end statement" --
#   this is a block-closing comment without the '#' sign.

So you could make it part of your code, rather than comments, and typing
an end shouldn't be considered too laborious, it's pretty commonly used.

If you don't know enough Python to complete this task, no wonder you're
having problems selling it.

> Yes, I suppose you could say this was a test of sorts.  Indentation is not
> the only issue that meets with objections, but it is the one that is
> easiest to solve.  My goal in making the suggestion that I did was as much
> to see what kind of responses it would get as to actually get the
> suggestion implemented.

Did we pass or fail? I think we passed with flying colors, but I imagine
your criteria are different. If you wanted to find out whether you could
get the Python community to all come together and re-work Python to fit
your personal needs, the answer is no, and we could have told you that
from the beginning.

By the way, even very good ideas that are well excepted very rarely
actually get implimented unless the driving force behind the idea writes
the code. See all the no-yet-implimented PEPs. In the free software
world, you are not going to get anything done unless you write the code,
or pay someone to write it for you. Good (and bad) ideas are a whole lot
more common than good code.

I don't know who wrote pindent.py, but you can bet is was someone who
wanted it, not someone who did it only because someone else suggested it
might be a good idea.


-Chris



-- 
Christopher Barker,
Ph.D.                                                           
ChrisHBarker at home.net                 ---           ---           ---
http://members.home.net/barkerlohmann ---@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Oil Spill Modeling                ------   @    ------   @   ------   @
Water Resources Engineering       -------      ---------     --------    
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------



More information about the Python-list mailing list