Allowing Arbitrary Indentation in Python

Gary gfixler at gmail.com
Wed Dec 19 23:07:09 EST 2007


On Dec 19, 7:01 pm, "Terry Reedy" <tjre... at udel.edu> wrote:

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

Thanks, Terry, and absolutely! You guys are quite tame compared to
some of the lions whose dens I've stumbled into on usenet. You're also
all well-spoken, passionate, and informative. I'm thinking of sticking
around in here while the learning's good.

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

It would seem that's been the biggest stumbling block - my wanton
mixing of imperative and declarative styles. I did do my best to
separate them geographically in my scripts - with the UI bits always
coming at the end :) I've made my justifications above - namely that
"Hey, it always worked fine!" and "Sorry, but there wasn't much in the
way of options," - but I'm quite ready to do things cleanly, properly,
extensibly, and Pythonically.


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

Sorry about that. I most definitely didn't want to have Python fork,
or change into some version compatible with my mind. I was mostly
stamping my feet, and whining about how all the options for doing what
I must do all the time seemed so overly complicated in comparison to
what I've already been doing. The full separation of the declarative
portion is the right answer to my problem, though, and requires no
changes, except to my methodology, and in that, only for the better.

> 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?"

Fair enough. Of course, if I'd actually posted to this newsgroup in
the first place, I probably would have stated it in a very similar
way. I'm quite polite, and descriptive in newsgroups, usually. This
was cross-posted to here from my LJ by my online friend, Sam, as an
unintended surprise gift to me :) Really, he was just curious about
what this group would have to say about my problems, and when he told
me of his crosspost, I was immediately quite interested as well. It
worked out for me, too, because now I have a better sense of the right
ways to go about a task I must do too often not to do intelligently.

Thanks for your help, Terry.
-g



More information about the Python-list mailing list