Path: csiph.com!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'value,': 0.03; 'that?': 0.05; 'cc:addr:python-list': 0.09; '22,': 0.09; 'rows,': 0.09; 'subject:string': 0.09; 'value.': 0.15; "?',": 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'url.': 0.16; 'wrote:': 0.16; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'aug': 0.20; 'am,': 0.23; 'select': 0.23; 'sat,': 0.23; 'header:In-Reply-To:1': 0.24; 'fri,': 0.27; 'message-id:@mail.gmail.com': 0.27; '+0200,': 0.27; '"do': 0.29; 'question:': 0.29; 'table': 0.32; 'equal': 0.34; 'received:google.com': 0.35; 'asking': 0.35; 'subject:: ': 0.37; 'really': 0.37; 'expect': 0.37; 'where': 0.40; 'some': 0.40; 'field': 0.60; 'your': 0.60; 'skip:u 10': 0.61; 'no.': 0.62; 'back': 0.62; 'more': 0.63; 'information': 0.63; 'records': 0.70; 'cecil': 0.84; 'chrisa': 0.84; 'westerhof': 0.84; 'to:none': 0.91; 'dennis': 0.91 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=ZskoTz8hWBzRBeiBO2doV1XGGXcKCGZVXRcHU7bzoJM=; b=Pq4RZHNfSz655sCyFBN035vmU5LFNrRc+/v/GVhd3+n6fq49WXjXQaRuhG/ZkyKQwv iHBnf0izqzOAcZ4xWwKaNX9F9PiEGPBz4xEWo2eXXEZwWmiTtlxodXH5Vi9dxK1QB5gb sl1f/wQkq6vVyIkhejpgAPkt5vY9XuLSuigvnIl5AHnQ/NEm6p423/iqZXZAoTs+JiXQ lAJfcz8SJg1qW5n6dOHH7LNkMFqzS7ayYfDKEA3VzvoolKAEwTPboMYEsbjRNay+10eU e8S6lp5nl8dw+1NPi+xKEholisZpMYCkFvhtlS9uHKtSMaQ19sAIh+Ou5o1I+fLNi54C q9uw== MIME-Version: 1.0 X-Received: by 10.50.143.2 with SMTP id sa2mr5784413igb.92.1440205405426; Fri, 21 Aug 2015 18:03:25 -0700 (PDT) In-Reply-To: References: <871tewppdr.fsf@Equus.decebal.nl> Date: Sat, 22 Aug 2015 11:03:25 +1000 Subject: Re: Every character of a string becomes a binding From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1440205408 news.xs4all.nl 23819 [2001:888:2000:d::a6]:45351 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95542 On Sat, Aug 22, 2015 at 10:47 AM, Dennis Lee Bieber wrote: > On Fri, 21 Aug 2015 18:39:28 +0200, Cecil Westerhof > declaimed the following: > >>I have the following with sqlite3: >>urls = c.execute('SELECT URL FROM LINKS WHERE URL = ?', url).fetchall() >> > Well, for one complication... You are asking for the very information > you are providing... > > select URL field > where the URL field is equal to some value. > > What do you really expect from that? If the table has multiple records > with the same URL value, you will get multiple copies of the same URL. More likely, it's a simple question: "Do you have this URL in your links?". If you get back a single row, the answer is yes; if you get back no rows, the answer is no. ChrisA