Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'operator': 0.03; 'charset:iso-8859-7': 0.04; 'correct,': 0.09; 'posted': 0.15; 'ah,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hits': 0.16; 'objects.': 0.16; 'precedence': 0.16; 'precedences': 0.16; 'tuple': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'second': 0.26; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; '>>>>': 0.31; 'post.': 0.31; 'universal': 0.31; 'programmers': 0.33; 'table': 0.34; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'method': 0.36; 'subject:?': 0.36; 'two': 0.37; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'called': 0.40; 'first': 0.61; 'confirm': 0.64; 'subject:. ': 0.67; 'mar': 0.68; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=r99XbNjmeUNQBfpLUZWUZQNvfFdfPNVH4c05Zeerp24=; b=yE4umjgRW354M2YPAR2HEi0et66vIFPcaj2haFUZPAsBM/cAt4hwBUcw3Hqmr8jEkr NIM7omsKTy6K6vU/acHvst2o00APGRC0WEMzH+hxnrv3L5H/KqfP24NUhKgL1t8dj+uE MJyKUh+rHLm8iykVHJSFapS8TAq0LwFOv1uklOEU1NTNmxPT/at13bz2HbRfoOMyIF2G kIKHwDEJ+0Tz2t81obOP0ugV2+/82L6LXkb45ivQpbIatyLfHagj5yf/i7Zh1m2YbNNv E1ol+2IDepyDLvumVL9R/VoUc0xVKR3o+SqrmDAIJau/69q/nU0Kr7vSN+QlGDnQ4EXG QW0Q== MIME-Version: 1.0 X-Received: by 10.220.88.145 with SMTP id a17mr25634609vcm.66.1364438000091; Wed, 27 Mar 2013 19:33:20 -0700 (PDT) In-Reply-To: References: <9c01c631-77e8-4104-ae1f-5cccfaaea10d@googlegroups.com> <22f50ec2-7d20-47af-a793-5cf801b6a23e@googlegroups.com> <515322EC.9080602@mrabarnett.plus.com> <64b1d68a-7cc2-4039-b550-7f4970442aec@googlegroups.com> Date: Thu, 28 Mar 2013 13:33:20 +1100 Subject: Re: MySQLdbd error. Perhpas it isn't installed? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364438002 news.xs4all.nl 6851 [2001:888:2000:d::a6]:38237 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42065 On Thu, Mar 28, 2013 at 1:24 PM, =CD=DF=EA=EF=F2 =C3=EA=F133=EA wrote: > I think i have figured this out: > > cur.execute( '''SELECT hits FROM counters WHERE url =3D %s''') , (page,) > > is a tuple of two objects. The first is the result of > cur.execute( '''SELECT hits FROM counters WHERE url =3D %s''') > and the second is > (page,) > > > cur.execute( '''SELECT hits FROM counters WHERE url =3D %s''' , (page,) ) > is the result of the execute method of the cur object called with two arg= uments. > > > >>>> int('10010110101', 2) > 1205 >>>> int('10010110101'), 2 > (10010110101, 2) >>>> > > Is this correct? Ah, crossed in the post. Yes, this is correct, as you can confirm with the operator precedence table that I posted above. (Experienced programmers would have the universal precedences in their heads, but the same applies.) ChrisA