Message from discussion
Problem with lists
Received: by 10.101.105.24 with SMTP id h24mr5001223anm.43.1320599997696;
Sun, 06 Nov 2011 09:19:57 -0800 (PST)
X-BeenThere: webpy@googlegroups.com
Received: by 10.101.208.32 with SMTP id k32ls10500082anq.5.gmail; Sun, 06 Nov
2011 09:19:54 -0800 (PST)
Received: by 10.236.185.197 with SMTP id u45mr34285187yhm.6.1320599994207;
Sun, 06 Nov 2011 09:19:54 -0800 (PST)
Received: by 10.236.185.197 with SMTP id u45mr34285186yhm.6.1320599994196;
Sun, 06 Nov 2011 09:19:54 -0800 (PST)
Return-Path: <anandol...@gmail.com>
Received: from mail-gx0-f170.google.com (mail-gx0-f170.google.com [209.85.161.170])
by gmr-mx.google.com with ESMTPS id y7si755905yha.4.2011.11.06.09.19.54
(version=TLSv1/SSLv3 cipher=OTHER);
Sun, 06 Nov 2011 09:19:54 -0800 (PST)
Received-SPF: pass (google.com: domain of anandol...@gmail.com designates 209.85.161.170 as permitted sender) client-ip=209.85.161.170;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of anandol...@gmail.com designates 209.85.161.170 as permitted sender) smtp.mail=anandol...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by ggnk4 with SMTP id k4so4164838ggn.29
for <webpy@googlegroups.com>; Sun, 06 Nov 2011 09:19:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to
:content-type;
bh=qm0nAYkAqr5vdEAjkxy+802xOXyQFM4NIFv4WdxK1AM=;
b=ph3yMZUycquNM5ilz68mSeTk/pxNEneIWsmMuon6cdGE04IsyaotejQ751vNxQZhr4
c1jXekf49yo0q55GUgy7i2wPDQsDKN9W7etRMuCH5i7DhQ4ib03gXDb1ZIqj5Hci9p4p
CgKSE5QxO8iIHXKfTyV0sZ8BpP0MGNoT88Ih0=
Received: by 10.236.126.52 with SMTP id a40mr29754291yhi.125.1320599994086;
Sun, 06 Nov 2011 09:19:54 -0800 (PST)
MIME-Version: 1.0
Received: by 10.236.111.39 with HTTP; Sun, 6 Nov 2011 09:19:33 -0800 (PST)
In-Reply-To: <48330453-4fe7-453c-9459-f8f02b32de81@l12g2000vby.googlegroups.com>
References: <d003ac12-2455-4e2e-9d06-b6dc01f82...@j20g2000vby.googlegroups.com>
<48330453-4fe7-453c-9459-f8f02b32d...@l12g2000vby.googlegroups.com>
From: Anand Chitipothu <anandol...@gmail.com>
Date: Sun, 6 Nov 2011 22:49:33 +0530
Message-ID: <CAC7wXFzYnrD7aT7cBOSMR5D_g7HTnZOU3Ss_HuCSs0+0V5k...@mail.gmail.com>
Subject: Re: [webpy] Re: Problem with lists
To: webpy@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1
2011/11/6 andrei <andre...@gmail.com>:
> db.select returns webpy's flavored iterator, to get a list from it
> wrap the result in list()
>
> p = list(db.select(person))
You can even do this:
p = db.select(person).list()
I find it more convenient than wrapping it in list(...).
Anand