Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79326
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.008 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.06; 'cursor': 0.09; 'trailing': 0.09; 'def': 0.12; '(),': 0.16; 'commas,': 0.16; 'one-element': 0.16; 'tuple': 0.16; 'tuple;': 0.16; 'exception': 0.16; 'topics': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'meant': 0.20; 'mon,': 0.24; 'post': 0.26; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'author,': 0.31; 'tuples': 0.31; 'created': 0.35; 'received:google.com': 0.35; 'christian': 0.38; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'new': 0.61; '20,': 0.68; 'subject:there': 0.68; 'id,': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=cGnlDvlDjv3ywjoPBmVRMLtPS7H08UhdFVf26Tm3ECI=; b=anN0U4By9bamOPZYioNxJrIBTWP2W3d9+r6Hqp4mkZkNLrNBhqSt88w/K6iSjdzhuP GBddiVZzGUDq/HeDw7jvjn5cv0aEyXgUnS59yJtr5J8OgI057ZNcA+kqmoW7yyEFd/B4 0cEHmVUhAaoILE1N/ackdBcpZ6oIIKidf2InD8Lz6A7jrwxoTaaJTiOLuV79NovVma6Y Rood9729zcDJ6FbhA7qXBgGZFLdfQmWA37UVeWtcDQ75PZjSFekP7Bw3B48iqYLPEJkX ljeZkldPmYJTBDohciqjdhQqG981kaSHLiGNo0xfActhlj6Kgp4zwURAFdJ83qnMZDRB esyA== |
| X-Received | by 10.66.191.135 with SMTP id gy7mr29642573pac.95.1413834087276; Mon, 20 Oct 2014 12:41:27 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <CAAp0bGvHZd66Dw4Z5wriDiMS4Xm50rKjNu+K7_L9scyMdXjWXw@mail.gmail.com> |
| References | <9a0c67be-de3a-4770-bf06-e158783bfff0@googlegroups.com> <mailman.14869.1413339808.18130.python-list@python.org> <m1l7l8$sce$1@dont-email.me> <CAMw+j7+CisEW8=jyVyxkj_7FDj_Lmj+CjjNbJ3Coi2c2q3C2Gg@mail.gmail.com> <m1m9ut$v8f$1@ger.gmane.org> <mailman.14893.1413401464.18130.python-list@python.org> <b474caf0-d910-4f59-86d8-006d316e858b@googlegroups.com> <54424691$0$12978$c3e8da3$5496439d@news.astraweb.com> <bd24df51-bdee-4ccc-82f7-28bf6dbd8bf5@googlegroups.com> <CALwzid=oS6H-ETtTPsRPawas-Gkj=7hkTWcwLmE8vZ7NdR5R+g@mail.gmail.com> <CALwzidmvwEfnsHExNdzDY8bs5YZ12QX_-rx3Ur+Hpz6Cg+WGdQ@mail.gmail.com> <CAAp0bGvHZd66Dw4Z5wriDiMS4Xm50rKjNu+K7_L9scyMdXjWXw@mail.gmail.com> |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | Mon, 20 Oct 2014 13:40:47 -0600 |
| Subject | Re: Is there an easy way to control indents in Python |
| To | Python <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.15002.1413834090.18130.python-list@python.org> (permalink) |
| Lines | 16 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1413834091 news.xs4all.nl 2978 [2001:888:2000:d::a6]:44623 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:79326 |
Show key headers only | View raw
On Mon, Oct 20, 2014 at 1:04 PM, Juan Christian
<juan0christian@gmail.com> wrote:
> Ok, new code using ?:
I suspect you meant to post this to some other thread.
> def get_db(_id):
> cursor = db.execute("SELECT ID, URL, AUTHOR, MESSAGE FROM TOPICS WHERE ID =
> ?", (_id))
> return cursor.fetchone()
(_id) is not a tuple; it's just a parenthesized variable name. To
create a one-element tuple you need a trailing comma: (_id,)
Remember that with the exception of the empty tuple (), tuples are
created by commas, not parentheses.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is there an easy way to control indents in Python ryguy7272 <ryanshuell@gmail.com> - 2014-10-14 19:13 -0700
Re: Is there an easy way to control indents in Python Juan Christian <juan0christian@gmail.com> - 2014-10-14 23:23 -0300
Re: Is there an easy way to control indents in Python alex23 <wuwei23@gmail.com> - 2014-10-15 17:27 +1000
Re: Is there an easy way to control indents in Python Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2014-10-15 16:32 +0200
Re: Is there an easy way to control indents in Python alex23 <wuwei23@gmail.com> - 2014-10-16 09:51 +1000
Re: Is there an easy way to control indents in Python Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-10-17 18:22 +1300
Re: Is there an easy way to control indents in Python Terry Reedy <tjreedy@udel.edu> - 2014-10-15 13:12 -0400
Re: Is there an easy way to control indents in Python Ian Kelly <ian.g.kelly@gmail.com> - 2014-10-15 13:30 -0600
Re: Is there an easy way to control indents in Python Simon Kennedy <sffjunkie@gmail.com> - 2014-10-16 07:08 -0700
Re: Is there an easy way to control indents in Python Chris Angelico <rosuav@gmail.com> - 2014-10-17 02:02 +1100
Re: Is there an easy way to control indents in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-18 21:53 +1100
Re: Is there an easy way to control indents in Python Simon Kennedy <sffjunkie@gmail.com> - 2014-10-20 08:54 -0700
Re: Is there an easy way to control indents in Python Ian Kelly <ian.g.kelly@gmail.com> - 2014-10-20 11:54 -0600
Re: Is there an easy way to control indents in Python Simon Kennedy <sffjunkie@gmail.com> - 2014-10-21 01:45 -0700
Re: Is there an easy way to control indents in Python Ian Kelly <ian.g.kelly@gmail.com> - 2014-10-21 11:09 -0600
Re: Is there an easy way to control indents in Python Ian Kelly <ian.g.kelly@gmail.com> - 2014-10-20 11:57 -0600
Re: Is there an easy way to control indents in Python Juan Christian <juan0christian@gmail.com> - 2014-10-20 17:04 -0200
Re: Is there an easy way to control indents in Python Ian Kelly <ian.g.kelly@gmail.com> - 2014-10-20 13:40 -0600
Re: Is there an easy way to control indents in Python MRAB <python@mrabarnett.plus.com> - 2014-10-20 20:43 +0100
Re: Is there an easy way to control indents in Python Juan Christian <juan0christian@gmail.com> - 2014-10-20 20:30 -0200
Re: Is there an easy way to control indents in Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-10-20 21:13 -0400
Re: Is there an easy way to control indents in Python Chris Angelico <rosuav@gmail.com> - 2014-10-15 13:18 +1100
Re: Is there an easy way to control indents in Python Dan Stromberg <drsalists@gmail.com> - 2014-10-14 19:38 -0700
Re: Is there an easy way to control indents in Python Zachary Ware <zachary.ware+pylist@gmail.com> - 2014-10-14 21:35 -0500
Re: Is there an easy way to control indents in Python Chris Angelico <rosuav@gmail.com> - 2014-10-15 13:47 +1100
Re: Is there an easy way to control indents in Python jumppanen.jussi@gmail.com - 2014-10-21 06:51 -0700
csiph-web