A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/070872.html below:

do...until wisdom needed...

do...until wisdom needed...Ken Peek Peek at LVCM.comNOSPAM
Mon Apr 16 09:55:51 EDT 2001
OK--

I will repeat a private email I sent to Paul Foley:

I am writing my own language based on Python for deeply embedded systems.  I
am not trying to change the Python language.  I would like all of the
traditional looping constructs in my new language, and so was trying to get
your opinion as to the best way to implement a "do...until" construct.  Yes,
I know that the "while" construct CAN be used, but it is not the "syntactic
candy" that we have all come to know and love.  I also plan on adding a
logical XOR operator, a logical shift right, and a few other things such as
absolute static typing, constants, constant pointers (for directing absolute
I/O in memory mapped I/O systems), etc. etc.

So, now that you know that I really am asking what I said I was asking, how
about answering my original question?

--Thanks


"Andrew Dalke" <dalke at acm.org> wrote in message
news:9be82a$eq7$1 at slb6.atl.mindspring.net...
> Ken Peek wrote:
> >Thank you for the history lesson.  My question still stands--  I
> >don't care if it will be implemented or not.  I am looking for
> >what would be the correct "Pythonic" construct if it WERE implemented...
>
> >"Terry Reedy" <tjreedy at udel.edu> wrote:
> >> This has been discussed ad nauseum for years with no agreement.  If and
> >> when maillist or newsgroup archives are available, you can review at your
> >> leisure.
>
> But that's Terry's point.  No one has decided on a "Pythonic"
> construct, and there have been arguments on that topic.  Nor
> did he mention anything about implementation.
>
> I just did a www.python.org/search for "do while until".  The
> first hit was to:
> http://groups.google.com/groups?q=do+while+until&hl=en&lr=&group=comp.lang.p
> ython.*&safe=off&rnum=1&seld=943960637&ic=1
> and since I don't know if that link will really work, the thread
> is named "why no "do : until"? and took place last December.
> (There are older threads, but not indexed by Google.)
>
> The consensus seems to be that there is no Pythonic syntax for
> a do/until construct.  It boils down to indentation.  Both your
> suggestions were proposed and it was decided that they didn't
> make sufficient sense:
>
>   do:
>     spam
>     until cond
>
> was found to be nothing more than an alias for
>
>   while 1:
>     spam
>     if not cond: break
>
> and not worth introducing new syntax.
>
> The other proposal is:
>
>   do:
>     spam
>   until cond
>
> but this "does not fit a pythonic pattern for statements"
> (Martijn Faassen).  Reread the full thread for details.
>
> So why didn't you believe that this exact history you were
> looking for already existed in the easily searchable archives,
> even after Terry pointed it out?
>
>                     Andrew
>                     dalke at acm.org
>
>
>
>
>
>
>



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4