Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.python > #4334
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | "Sven R. Kunze" <srkunze@mail.de> |
| Newsgroups | de.comp.lang.python |
| Subject | Re: [Python-de] Schleifen die ohne Durchlaufen des Schleifenkörpers beendet wurden |
| Date | Tue, 29 Mar 2016 09:05:46 +0200 |
| Lines | 34 |
| Message-ID | <mailman.131.1459235153.28225.python-de@python.org> (permalink) |
| References | <56F445C9.3000200@mail.de> <CAMSP2L7OBP5h4yjrRrx4XuvwE3UMTg=grZqPzJ7B9ZEyYYXD5A@mail.gmail.com> <E7199327-B882-4691-A703-351C20DFE173@web.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news.uni-berlin.de rIQpXrvirVLBE4s65q5k1wtsnakgI+UuOh/1YxceZchQ== |
| Return-Path | <srkunze@mail.de> |
| X-Original-To | python-de@python.org |
| Delivered-To | python-de@mail.python.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mail201212; t=1459235151; bh=xuiPvqDduGwrhAG5vfg+pO2cRi+YoBvDphJrFMIHAnQ=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=BAncXcKMpVP1mudvHUyf/GpXH0r9TpLsmA9IdyfKme4dPqhcfhLZ3e0NIREqTRGPE 6i7LX+x8pPX5m5EnIdI4JJCtwi/aCHZdaQkYchCgeyOtxpv+Qn0F1SxTgOgQeDYiRi 0mCcwULWdOdJVbnGSSpA2nnnKOrQKUgSq15Et3qw= |
| In-Reply-To | <E7199327-B882-4691-A703-351C20DFE173@web.de> |
| X-purgate | clean |
| X-purgate | This mail is considered clean (visit http://www.eleven.de for further information) |
| X-purgate-type | clean |
| X-purgate-Ad | Categorized by eleven eXpurgate (R) http://www.eleven.de |
| X-purgate | This mail is considered clean (visit http://www.eleven.de for further information) |
| X-purgate | clean |
| X-purgate-size | 976 |
| X-purgate-ID | 154282::1459235151-000018ED-95162DFF/0/0 |
| X-BeenThere | python-de@python.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | Die Deutsche Python Mailingliste <python-de.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-de>, <mailto:python-de-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-de/> |
| List-Post | <mailto:python-de@python.org> |
| List-Help | <mailto:python-de-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-de>, <mailto:python-de-request@python.org?subject=subscribe> |
| Xref | csiph.com de.comp.lang.python:4334 |
Show key headers only | View raw
On 24.03.2016 22:01, Diez B. Roggisch wrote: > Hallo Harald, > >> collection=[] >> >> for item in collection: >> print item >> else: >> print "allways read the documentation" >> >> >> probier das mal... Guido hat Dein Keyword per Zeitmaschine schon in 2.7 >> eingebaut. > So leid’s mir tut, aber lies die Dokumentation mal selbst ;) Der Else-Zweig wird naemlich auch dann ausgefuehrt. Er wird nur NICHT ausgefuehrt, wenn der Schleifenkoerper durch ein break verlassen wird. ;) > Ich finde, das war eine vertane Chance - die von Sven gewuenschte Semantik ist IMHO deutlich sinnvoller, aber dieses Kind ist so jedenfalls schon im Brunnen. > > for …: > … > not: > … > > koennte syntaktisch klappen, weil not sonst eine Expression erwartet. Diesen Vorschlag gab es noch nicht. Daran könnte man sich gewöhnen. > Aber for/else… hach, das waere schon schoen gewesen. Du sagst es; wie Harald eindrucksvoll gezeigt hat. vG Sven
Back to de.comp.lang.python | Previous | Next | Find similar
Re: [Python-de] Schleifen die ohne Durchlaufen des Schleifenkörpers beendet wurden "Sven R. Kunze" <srkunze@mail.de> - 2016-03-29 09:05 +0200
csiph-web