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


Groups > comp.lang.python > #32073

Re: while expression feature proposal

Path csiph.com!usenet.pasdenom.info!news.albasani.net!news.musoftware.de!wum.musoftware.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.036
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'subject:while': 0.09; '"m"': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'oct': 0.16; 'simpson': 0.16; 'subject:expression': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'received:209.85.214.174': 0.21; 'assignment': 0.22; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'stuff': 0.30; 'could': 0.32; 'to:addr:python-list': 0.33; 'languages': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'something': 0.35; 'there': 0.35; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'results': 0.65; 'as:': 0.75; 'tok': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=0DvthIoSyGFlfrLx24kSBCWjdLx3LgLM/yD5XGzjc0U=; b=I8tAwEtuTRJEZMEocXImaGYv/hLS/WauokjfXsBTYi8zbEpK6LPz3XqTtiFljkng++ xs2RcAV1RF2uzeGXJXOeW5U6NXaXJYRdKVq8o3Z3MucyGotthlhTdBEhkOCrSgql+9tN gbikyUEv77PTqQqNBrLhiPRQuLPu6OQtnp7ruxnZiYT9s/wfomeBbbgLISJGCSFJJnYL zcnbWsvArocIClKR7jSiGMacwxDPE8T/CjilIsmlaUOWs4BL+driVrS2dFi5wPkBZRts c9442y0vCkkI6vqTcs1ZpxR8tHv0SsvuV1Eyg3sU3l/u8he5nTGgDJAFDMOsZvsZyPbm nevA==
MIME-Version 1.0
In-Reply-To <20121024222656.GA32708@cskk.homeip.net>
References <50886398.5050301@tim.thechases.com> <20121024222656.GA32708@cskk.homeip.net>
Date Thu, 25 Oct 2012 09:40:00 +1100
Subject Re: while expression feature proposal
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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.2801.1351118402.27098.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1351118402 news.xs4all.nl 6932 [2001:888:2000:d::a6]:47287
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:32073

Show key headers only | View raw


On Thu, Oct 25, 2012 at 9:26 AM, Cameron Simpson <cs@zip.com.au> wrote:
> If I could write this as:
>
>   if re_FUNKYPATTERN.match(test_string) as m:
>     do stuff with the results of the match, using "m"

Then you'd be right there with C-like languages where assignment is an
expression :)

while (tok = strtok(blah,blah)) ... do something with tok ...

ChrisA

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


Thread

Re: while expression feature proposal Chris Angelico <rosuav@gmail.com> - 2012-10-25 09:40 +1100

csiph-web