Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #104998

empty clause of for loops

Path csiph.com!2.eu.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!ecngs!testfeeder.ecngs.de!newsfeed.freenet.ag!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail
From "Sven R. Kunze" <srkunze@mail.de>
Newsgroups comp.lang.python
Subject empty clause of for loops
Date Wed, 16 Mar 2016 11:23:15 +0100
Lines 16
Message-ID <mailman.186.1458123807.12893.python-list@python.org> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de zwKVAGW8tU9TshC1nV9srAGljWKHDGWq1jpxh1Oe6vRQ==
Return-Path <srkunze@mail.de>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.066
X-Spam-Evidence '*H*': 0.87; '*S*': 0.00; 'issue:': 0.09; 'list)': 0.16; 'pythonic': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'to:name:python list': 0.16; 'this?': 0.34; 'received:10.0': 0.34; 'best,': 0.35; 'mine': 0.35; 'something': 0.35; 'to:addr :python-list': 0.36; 'received:10': 0.37; 'doing': 0.38; 'hi,': 0.38; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'colleague': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mail201212; t=1458123799; bh=3HngENQWFRvvJu8AyFiJ28BikwNMcl0XJxeraYwXAUM=; h=To:From:Subject:Date:From; b=MVHGcAS2VZDHGGkyFm1/2FL3EH6TXYX05p6DfYzJl+3aA0Y1H8inw2t/tmZ6Ivl+O x1JJYDWw61k5ChX66jo0a628Y+qAIKjm10vuKvvCZvRYtasZ6sQq+Giz4b9EiY7dzX XsnSHGimT9XJlYBX4tjTt0BM+yBYl9TV3By0YKWs=
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 236
X-purgate-ID 154282::1458123798-00003BBD-601D573B/0/0
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:104998

Show key headers only | View raw


Hi,

a colleague of mine (I write this mail because I am on the list) has the 
following issue:


for x in my_iterable:
     # do
empty:
     # do something else


What's the most Pythonic way of doing this?

Best,
Sven

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

empty clause of for loops "Sven R. Kunze" <srkunze@mail.de> - 2016-03-16 11:23 +0100
  Re: empty clause of for loops Steven D'Aprano <steve@pearwood.info> - 2016-03-16 23:08 +1100
    Re: empty clause of for loops "Sven R. Kunze" <srkunze@mail.de> - 2016-03-16 15:44 +0100
  Re: empty clause of for loops André Roberge <andre.roberge@gmail.com> - 2016-03-16 05:41 -0700
    Re: empty clause of for loops Steven D'Aprano <steve@pearwood.info> - 2016-03-16 23:59 +1100
    Re: empty clause of for loops Peter Otten <__peter__@web.de> - 2016-03-16 14:04 +0100
  Re: empty clause of for loops Palpandi <palpandi111@gmail.com> - 2016-03-18 12:10 -0700

csiph-web