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


Groups > comp.lang.python > #75278

Re: complete brain fart, it doesn't loop

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.058
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; 'yeah,': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; '*any*': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'generator.': 0.16; 'preserves': 0.16; 'wrote:': 0.18; "hasn't": 0.19; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; '(which': 0.31; 'framework': 0.33; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'similar': 0.36; 'list.': 0.37; 'list,': 0.38; 'called': 0.40; 'temporarily': 0.60; 'more': 0.64; 'jul': 0.74; 'otten': 0.84; 'suspicion': 0.84; 'to:none': 0.92; 'state.': 0.95
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=I3UVrYvt7B+aY6WOeDFsYsumkcU4uTO6Y1ZvutOSV10=; b=0TLPltvl+x7bo7Oe+1ocg87mUNbw1CQVMwAUiLbsgiZMGbDlsRnZZF7wSbbOr0ExOp uujRuQ1GVhRpPUk4+juOY7Ar65uM9CvjNPTGXwWc4nLoVS/UiGTDJbBQQp3mET+apDyJ XoronZrz/CCbDj4h/ZY5r5KuaYQJDF55Yqqpi48krBq+tAW/v4QwPhB32Q7Ee6XMw/+x dGJEEqtm/kdGr9k4ux9k1mOefOw1uV8rm4j5kupElLVYHKqHDGob9E090rqxVQaMQ+I0 LW4dvr/NemeDPxQWrt8c8Aj8qEezSJHseChgWZ7VgqfKlf1aQ+/k0sJ2qPcp/Q1A2oiv xnxA==
MIME-Version 1.0
X-Received by 10.43.96.65 with SMTP id cf1mr5976432icc.26.1406484647901; Sun, 27 Jul 2014 11:10:47 -0700 (PDT)
In-Reply-To <lr3f5l$e4h$1@ger.gmane.org>
References <CAHXoDSB=W3S4gwc7aJO2AA6gtkz5VGQ5=y7hZ5tLL32AamjmXQ@mail.gmail.com> <CAPTjJmrdqBwuiuJHSAGCjRZoWsQzi_iFVJe=XD3m0nbGa9w_Cg@mail.gmail.com> <lr3f5l$e4h$1@ger.gmane.org>
Date Mon, 28 Jul 2014 04:10:47 +1000
Subject Re: complete brain fart, it doesn't loop
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.12363.1406484657.18130.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1406484657 news.xs4all.nl 2948 [2001:888:2000:d::a6]:33712
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:75278

Show key headers only | View raw


On Mon, Jul 28, 2014 at 4:07 AM, Peter Otten <__peter__@web.de> wrote:
> By the way, Python has something similar to a function that temporarily
> interrupts execution but preserves state. It's called generator.

Yeah, but I have a suspicion his web framework (which he hasn't
identified, but I suspect *any* web framework) won't be looking for a
generator :) More likely, what he wants is to collect up the return
values in a list, and then return ''.join() that list.

ChrisA

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


Thread

Re: complete brain fart, it doesn't loop Chris Angelico <rosuav@gmail.com> - 2014-07-28 04:10 +1000

csiph-web