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


Groups > comp.lang.python > #31189

Re: How to use "while" within the command in -c option of python?

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <thbach@students.uni-mainz.de>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.014
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'explicitly': 0.04; 'subject:How': 0.09; 'python': 0.09; 'block.': 0.09; 'information?': 0.09; 'subject:command': 0.09; 'subject:while': 0.09; 'subject:python': 0.11; 'language': 0.14; 'sat,': 0.15; 'anyways,': 0.16; 'oct': 0.16; 'semicolon': 0.16; 'wrote:': 0.17; 'statement': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; "d'aprano": 0.29; 'separated': 0.29; 'statements': 0.29; 'steven': 0.29; 'gets': 0.32; 'url:python': 0.32; 'could': 0.32; 'right?': 0.33; 'to:addr:python-list': 0.33; "can't": 0.34; 'subject:?': 0.35; 'url:org': 0.36; 'subject:" ': 0.36; 'anything': 0.36; 'does': 0.37; 'subject:: ': 0.38; 'url:docs': 0.38; 'received:10': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'content-disposition:inline': 0.60; 'link': 0.60; 'thomas': 0.62; 'provide': 0.62; '8bit%:21': 0.69; 'received:10.94': 0.84; 'subject: -': 0.84; 'url:reference': 0.84; '\xe2\x80\x9cthe': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=uni-mainz.de; i=@uni-mainz.de; q=dns/txt; s=ironport; t=1350117768; x=1381653768; h=date:from:to:subject:message-id:references:mime-version: content-transfer-encoding:in-reply-to; bh=ynb+Zi0hl8zSTGkww4Z1tUjUGyS1A2PWCtJzTiDRDLQ=; b=d6WjYvfqqPDzPjGem9fDgZjP/cqMnNzQpyeDNdFRUk2Sm8jGRiVJ/qOY 8VzV9mCEswAOjCGCsZZ+BJX/rYC9+5GKM4EgyOkNwluLcF1scWolV73ht f/5tvucgQgW2RPoWuN/+PTTEezflaIBrWLW1tAUELKtirc4piihKJ+BFw w=;
X-IronPort-Anti-Spam-Filtered true
X-IronPort-Anti-Spam-Result Ap4EAEQoeVAKXgZQ/2dsb2JhbABEhhK6YoIgAQEFIw8BVgsYAgImAgIUKQoWiBsHqQuSPoEhijiDHIIPMmADlWsBgRWPG4JvghU
Date Sat, 13 Oct 2012 10:41:32 +0200
From Thomas Bach <thbach@students.uni-mainz.de>
To <python-list@python.org>
Subject Re: How to use "while" within the command in -c option of python?
References <CANOe_mhhn31Qb2iB1nWydWSm=MJ0xK0o5vxWR+mLeO5ggqwmwQ@mail.gmail.com> <mailman.2101.1350083051.27098.python-list@python.org> <5078b6a9$0$6574$c3e8da3$5496439d@news.astraweb.com>
MIME-Version 1.0
Content-Type text/plain; charset="utf-8"
Content-Disposition inline
Content-Transfer-Encoding 8bit
In-Reply-To <5078b6a9$0$6574$c3e8da3$5496439d@news.astraweb.com>
User-Agent Mutt/1.5.21 (2010-09-15)
X-Originating-IP [88.69.178.148]
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2109.1350117769.27098.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1350117769 news.xs4all.nl 6876 [2001:888:2000:d::a6]:36927
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:31189

Show key headers only | View raw


On Sat, Oct 13, 2012 at 12:32:41AM +0000, Steven D'Aprano wrote:
> 
>  He gets SyntaxError because you can't follow a semicolon with a
> statement that begins a block.

Can someone provide a link on where to find this type of information?
I was just hunting through “The Python Language Reference” and could
not find anything explicit. The only thing I found is

http://docs.python.org/reference/simple_stmts.html

“Several simple statements may occur on a single line separated by
semicolons.”

Anyways, this does not explicitly say “You shall not put a compound
statement after a simple statement separated by a semicolon.”, right?

Regards,
	Thomas Bach.

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


Thread

Re: How to use "while" within the command in -c option of python? Etienne Robillard <animelovin@gmail.com> - 2012-10-12 19:04 -0400
  Re: How to use "while" within the command in -c option of python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-13 00:32 +0000
    Re: How to use "while" within the command in -c option of python? Thomas Bach <thbach@students.uni-mainz.de> - 2012-10-13 10:41 +0200
    Re: How to use "while" within the command in -c option of python? Chris Angelico <rosuav@gmail.com> - 2012-10-13 20:03 +1100
    Re: How to use "while" within the command in -c option of python? Chris Angelico <rosuav@gmail.com> - 2012-10-14 04:23 +1100
      Re: How to use "while" within the command in -c option of python? Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2012-10-13 20:43 +0300
        Re: How to use "while" within the command in -c option of python? Chris Angelico <rosuav@gmail.com> - 2012-10-14 04:47 +1100
    Re: How to use "while" within the command in -c option of python? Chris Angelico <rosuav@gmail.com> - 2012-10-14 05:41 +1100
    Re: How to use "while" within the command in -c option of python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-10-13 15:19 -0400
    Re: How to use "while" within the command in -c option of python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-10-13 16:42 -0400
    Re: How to use "while" within the command in -c option of python? Chris Angelico <rosuav@gmail.com> - 2012-10-14 08:39 +1100
    Re: How to use "while" within the command in -c option of python? Chris Angelico <rosuav@gmail.com> - 2012-10-14 09:09 +1100

csiph-web