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


Groups > comp.lang.python > #69237

Re: Python language hack for C-style programmers [DO NOT USE!] :-)

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.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.010
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.06; 'if,': 0.09; 'subject: [': 0.09; 'subject:language': 0.09; 'yeah,': 0.09; 'cc:addr:python-list': 0.11; 'afaik.': 0.16; 'c++)': 0.16; 'for,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'variable': 0.18; '(in': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'certain': 0.27; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'fri,': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'ends': 0.38; 'pm,': 0.38; 'dave': 0.60; 'new': 0.61; 'mar': 0.68; 'subject:NOT': 0.84; 'angel': 0.91; 'to:none': 0.92
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:cc :content-type; bh=rwaCjOnrwOsbwTmFyW/djUcajEOqTCqZIzl6lhnhK7E=; b=FPY/T2FV81zho/nnVfIop4CJyUipE8JuklhyVkSPETLp2M/eSSti4zJvzlouQUv+ar xk/0fXwWcW61Jc8Dw3hbNQ8jrI6pocZht9SYg2X8mzy+jzUCNLFHJULEDEJ75iyzeJw0 9zz9Y2MVfzI5+1q8vEI+OydvTXXbJGa9W7slRk/p3vt2NwjVu+3fPpZ04d9yZZvyR7ud VpTAAhumJifDAfwgYpl/265dovG+yHaXc3LGCrwpPeR3h7YhwAHJFOkpXTWwn6l2G+ev TKQ8HhtCxytI4x1BMDba9nJvRBdhd1YCup0vAaT8Uiw52OjwLI0WWR+cM/3reRn4xmOz jQCQ==
MIME-Version 1.0
X-Received by 10.66.129.133 with SMTP id nw5mr5380319pab.98.1395971524209; Thu, 27 Mar 2014 18:52:04 -0700 (PDT)
In-Reply-To <lh2jsg$cqu$1@ger.gmane.org>
References <20140327110856.14991bb0@bigbox.christie.dr> <CAPTjJmoSEiBEO9fXfwM7mGywty+dT8erBqeu2mpyrxAf12udcw@mail.gmail.com> <lh2jsg$cqu$1@ger.gmane.org>
Date Fri, 28 Mar 2014 12:52:04 +1100
Subject Re: Python language hack for C-style programmers [DO NOT USE!] :-)
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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 <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>
Newsgroups comp.lang.python
Message-ID <mailman.8648.1395971533.18130.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1395971533 news.xs4all.nl 2852 [2001:888:2000:d::a6]:55729
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:69237

Show key headers only | View raw


On Fri, Mar 28, 2014 at 12:44 PM, Dave Angel <davea@davea.name> wrote:
>> if (array m = Regexp.split2(some_pattern, some_string))
>>     do_something(m);
>>
>
> I don't know for certain about if, but you can declare (in C++) a
>  new variable in for, which is a superset of if. Scope ends when
>  the for does.

Yeah, but only a for, AFAIK. Not an if or a while.

ChrisA

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


Thread

Re: Python language hack for C-style programmers [DO NOT USE!] :-) Chris Angelico <rosuav@gmail.com> - 2014-03-28 12:52 +1100

csiph-web