Allowing Arbitrary Indentation in Python

Terry Reedy tjreedy at udel.edu
Wed Dec 19 22:01:57 EST 2007


"Gary" <gfixler at gmail.com> wrote in message 
news:92ab48e1-c5f9-496a-a8ae-a0bf9ef957b1 at d4g2000prg.googlegroups.com...
| Hi! I'd like to join the fray, as the person who posted that original
| LJ rant. First, some full disclosure, and stampings out of what seem
| to me to be misconceptions...

Hi, Gary.  Welcome to Python.  I hope you will take some of the reaction 
you got as initiatory ribbing.

| 1) I am not a CS major.

Neither am I.

Anyone who loves Python obvious likes the idea of meaningful indentation. 
The problem with your suggestion and example is with mixing two meanings in 
the same hierarchy.  Hence the suggestion that you separate program text 
and declarative text.

| Grant Edwards also said:
| "Changing the language in order to allow authors to mislead readers is
| a bad thing."
|
| I'm not sure exactly what you mean by this, but I'm not really asking
| for the language to be changed.

You fooled me as well as others.  OK, perhaps you were merely pointing out 
that Python could be changed without 'really' asking that the change be 
made.  However, the subject line, the specifics in the post, and the 
example constitute a more basic change in Python than you perhaps realize. 
Hence the reaction.

| I think mostly I'm simply pointing out
| that it was very easy in MEL to express what I wanted in a simple,
| straightforward, very readable way, but in Python, this seems not to
| exist. I was looking for the Pythonic way to do it, but every example
| so far takes this very simple concept, and makes it a rather
| complicated affair, IMHO.

The sort of change you mentioned would take at least a couple of years even 
if the developers loved it, which I am 99.9% sure they would not.
So in any case, you will have to make do with Python as is for the near 
term.

A reasonable question would be something like this.  "I currently do gui 
layout with MEL [what is that?] and like this but not that.  I am looking 
at Python because of X.  How do people express gui layout within or in 
conjuction with Python code?"

Terry Jan Reedy






More information about the Python-list mailing list