No Do while/repeat until looping construct in python?

Steve Holden sholden at holdenweb.com
Mon Mar 17 10:30:34 EST 2003


"William Sonna" <wsonna at attglobal.net> wrote to comp.lang.python, in various
posts and at various times, but invariably in the same strident tone ...

> On Wed, 12 Mar 2003 22:24:24 -0600, Lars W wrote:
>
> > Hello!
> >
> > Why is there no do-while looping construct in Python?
>
>
> Because the person(s) who decide the language refuse to face up to the
> fact that they screwed up by not including it.  Its an obvious flaw that
> dogma prevents from being corrected.
>
Erm, obvious to you, perhaps. However, if you stop to think about what's
implied by what you say then you should realise that you are actually being
offensive here to a very experienced group of language designers and
implementors. The omission is deliberate; that doesn't make it a mistake.

> Its not going to change, either, so file it right next to "self" as the
> second of the two most-hated "features" of the language.  The problem is
> that as a relatively small language, you can't escape them.
>
Small by design.

[...]
>
> Ugly as sin - but they do work.  And they are a hell of a lot easier than
> learning Japanese in order to learn a rival scripting language that
> doesn't suffer from these particular idiosyncracies.
>
I see. So you're happy throwing stones at every language, not just Python?
And enough with the racial references, many non-Japanese-speaking
programmers have managed to learn Ruby.

[...]
> That says more about the way you solve problems than anything about the
> language.  Can you seriously deny that there are a substantial number of
> algorithims that involve one-or-more iterations?

I don't think anyone's trying to deny that. Can you deny that it's possible
to write one-or-more loops in Python as it stands now? I know you'll think
I'm just spouting dogma, but there's a *reason* why Python doesn't get
features added to it on a whim.

[...]
> I'm critical of this "feature" because I am willing to admit that the tool
> isn't perfect, despite the fact that it is my personal choice for solving
> many types of problems.
>
> A flawed masterpiece IS still a masterpiece.

Indeed. It's also difficult to find any example of perfection. And yet still
there are those who, despite their apparent absence of contributions to the
Python core, feel free to bitch and moan :-). Fortunately there's no law
against such presumption. None of the PythonLabs developers think that
Python is perfect, and indeed they are well aware of the pragmatic aspects
of language design.

[...]
> Now be a good boy, eat some more shit and get back to your regularly
> scheduled trolling NOW or I'll tell your mother what you've been up to!!

I surely can't be the only c.l.py who finds this approach to technical
debate both unnecessary and offensive. What's more, it says more about the
way you approach language criticism than anything about Python. There was
nothing in J.P.'s posting that would have cuased *me* to respond in that
way. What provoked *you*?

[...]
> > Troll? Flamebait? Or just uninformed?
>
> None of the above.  Legitmate criticism of questionable design decisions
> made.  Either respond to the issues raised or look foolish- your choice.

You would do well to take your own advice. Do you READ the stuff you write?

[...]
> > "Hated"?  Yeesh...
> >
> Yes. Hated.  Go to the Ruby web site - one of the quoted "features" of
> Ruby is not having to type "self".

The mere fact that you talk in emotional terms about the features of
programming languages is an indication of your abilities (or lack of them).
You should expect people to take notice of this in their treatment of your
assertions. And who or what gave you the information about what's
"most-hated" about Python? I presume you are in touch with the Python
community over a long period of time in order to be able to make such
assertions?

[...]
> On the other hand, if you have a valid reason why "self" is advantageous
> FROM THE USER's POINT OF VIEW I would like to hear it.

Because it makes a clear distinction between instance variables and
method-local variables which otherwise would not exist. You seem to find
this tedious. I find it useful.

[...]
> >> > Troll? Flamebait? Or just uninformed?
> >>
> >> None of the above.  Legitmate criticism of questionable design
> >> decisions made.  Either respond to the issues raised or look foolish-
> >> your choice.
> >>
> >>
> > "Questionable design".  That's a pretty subjective qualification,
> > because it's "questionable" from your point of view, using your scale of
> > what's important and what's not.
> >
> >
> EVERY design decision in the world is subject to question, therefore
> questionable.  That is an OBJECTIVE fact.

If you accept that, then there's nothing at all special about Python's
design. Since all designs are questionable, Python's design is on those
terms precisely as good or as bad as any other. This is just wriggling to
try to avoid facing up to the fact that your judgements about the language
are indeed subjective, as are mine, as are Alex Martelli's, as are Guido's.
Of the four people I mentioned, however, you are the only one discusssing
the issues in these infantile terms, and this alone qualifies you as someone
worth ignoring.

[...]
> Instance variables are in the namespace of the local variable "self", but
> they are never local despite the fact that they occur in an instance
> method of the same instance of the same class.
>
That's because a method call, like any other function call, has its own
namespace (the one whose contents are returned by the built-in locals()
function) which is entirely separate from the instance's namespace (in which
the instance variables and methods are held). I'm not sure how you would
merge the method's namespace and the instance's namespace. Could we perhaps
see a PEP on this topic?

This separation is extremely useful.

> I find it very confusing, and while I can parrot the rules, I don't think
> I'll EVER understand the rationale (unless someone can explain it).

Well, I've tried. However, I'm not optimistic that I'll succeed where so
many others have apparently failed. I think it says quite a lot for Python
that despite what appears to be a pretty fundamental lack of understanding
on your part you like the language enough to persevere in its use. Would you
agree?

[...]
> > You're oversensitivity to criticism to your own comments, while
> > attacking others who disagree with you, truly make you out as a troll.
> > Many won't take your comments seriously and will simply ignore you
> > because of it.
> >
> >
> Who's throwing flames here?  YOU just said I am a troll.  And I haven't
> insulted you once!  tu MADRE, cabron!
>
None the less, you seem quite prepared to descend to name-calling when your
arguments are criticised.

> All kidding aside - my response? - I am NOT a troll, but you APPEAR to be
> a very poor debater.
>
People who live in glass houses shouldn't throw stones.

> The true test of poor-debaterhood is substitution of facts and logic for
> unsubstantiated claims and personal attacks.

Indeed that is *one* test (among many). And by your own test, you just
failed.

[...]
> If you can answer these questions without making false claims about me or
> my motives or resorting to insults or personal attacks, there's hope for
> you yet.

You don't by any chance have a mirror handy, do you?

[...]
> What I am sick of is getting nailed by the interpreter for forgetting to
> add "self" to every lousy instance variable name - or even worse - having
> it treat my omission as a local variable.  The mandatory self is itself a
> source of errors, and I believe based on my own experience that it creates
> more errors than it prevents.
>
Ah, right. Of course. Your own experience. Well, that's a sound basis for
global conclusions about the acceptability of language features to the
programming community, isn't it? If you'll pardon my saying so (and I truly
hope you will), that shows a certain arrogance which won't, generally
speaking, predispose people to consider your point of view.

> Call it a feature if you will, but my guess is that its an implementation
> requirement that has a side benefit for those who like mandatory
> qualification.

The very fact that you have to guess reveals your comments for the
ill-informed opinion that many of them truly are. Python has a
well-documented history, and by researching it you could actually inform
your arguments. Have you ever read the appropriate FAQ entry? It's

    http://www.python.org/doc/FAQ.html#6.7

and it makes a reasoned argument for the use of an explicit self.

[...]
> In the mean time, I'll keep makng the same dumb mistake over, and over,
> and over, and over, and over, and over, and over, .....

Well, "those who cannot remember the past are condemned to repeat it".  I'm
afraid your inability to work around what apparently shrieks at you as a
deficiency in the language says rather more about your approach to
programming than the language you choose to program in.

[...]
> As for what I said to J.P., I stand by what I said.  His was a shit-eating
> response.  Funny, yes, but shit-eating nonetheless.  I wasn't the least
> bit insulted by it, and I'm sure HE wasn't the least bit insulted by my
> reply.
>
I'm not sure where this certainty comes from. On reading J.P.'s comments I
thought his suggestion quite reasonable. Your attitude is almost that of
someone who uses the right of free speech to complain about others' free
speech. Ultimately, if you don't like Python you can always choose to use
some other language.

And for what it's worth, *I* found your remarks offensive, whether J.P. did
or not.

> I also don't think you have anything of value to add to this thread, so
> please take your final shot at me and buzz off.
>
Right, I'd forgotten that something must be true because you think it is.

> You may call me whatever you feel is appropriate, and as long as you don't
> lie about what I or others have said in this thread I won't respond and it
> ends here.
>
> I promise - but remember - NO LIES - READ THE POSTS.

Well, in that case I have every hope that you will read this post and not
respond. I'm afraid your writing is boringly predictable much of the time.
You promised, remember ...

[...]
> My point being that if you now tell me you're actually from Honduras, I
> look foolish for not confining MY posts to what is ACTUALLY WRITTEN.

I am sorry to have to tell you that, wherever your correspondent hails from,
the racial analysis you (jokingly?) performed was quite fatuous enough to
make you look foolish (in my eyes) with no further input about the actual
location concerned.

Almost at the end of this seemingly-interminable post, I find myself
wondering why I have bothered, and I suppose you might be asking yourself
the same question (although it's possible you will have made your mind up
long ago, and therefore not actually be reading this any more).

The point is that in contributing to a newsgroup you are involved in a
cultural activity, and the nature of the postings you have made runs
somewhat counter to the conventional approach in comp.lang.python. I have no
more right to criticize you than any other reader has, so please do not
assume I am trying to "police" the content of this group on behalf of others
(who are anyway quite capable of responding for themselves). Firstly I have
no right to do so, and secondly I wouldn't want that right. I am simply
trying to point out that if you *want* to benefit from this group then a
less abrasive attitude will almost certainly meet with a more welcoming
response.

Although the group is a channel for technical discussions, most of the
participants are people (and the bots are sufficiently good simulations to
be included despite their mechanical natures). Therefore emotional language
will inevitably provoke an emotional response, which generally isn't helpful
in trying to resolve technical issues. Or many other issues, come to that.

Your determination to maintain your own point of view in the face of
criticism shows an admirable single-mindedness, but I wish you would temper
that with a less-inflammatory approach to debate. That way you can become a
useful member of the c.l.py community rather than a noisesome thorn in its
side. Should this unlikely transformation take place I will count the
not-inconsiderable time taken to compose this response well spent.

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Register for PyCon now!            http://www.python.org/pycon/reg.html








More information about the Python-list mailing list