Path: csiph.com!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'args': 0.04; 'argument': 0.04; 'subject:Python': 0.05; 'sql.': 0.07; 'rows': 0.09; 'sep': 0.09; "wouldn't": 0.11; 'hire': 0.15; 'for,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'limit.': 0.16; 'offset,': 0.16; 'places.': 0.16; 'sad': 0.16; 'wrote:': 0.17; 'example.': 0.17; 'thu,': 0.17; 'code,': 0.18; 'changes': 0.20; 'sort': 0.21; 'bit': 0.21; 'received:209.85.214.174': 0.21; 'supposed': 0.21; '(all': 0.22; 'subject:Questions': 0.22; 'insert': 0.23; 'posts': 0.23; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'question': 0.27; 'start,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'questions.': 0.29; 'no,': 0.29; "i'm": 0.29; 'returned': 0.30; 'code': 0.31; 'anybody': 0.32; "he's": 0.33; 'to:addr:python-list': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'clear': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'problems': 0.36; 'itself': 0.37; 'does': 0.37; 'being': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'header:Received:5': 0.40; 'evaluate': 0.62; 'gave': 0.65; 'limit': 0.65; 'quality': 0.69; 'lack': 0.71; 'subject:Interview': 0.84; '"how': 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:to :content-type; bh=/ajNWvGbikQWFbRWPLneiJekF+xRTfc9p0NpEW0/d7E=; b=zTj3xjzWxbFMxzVRSmGuI0N7ZKfAYKYPlI41FibY0X9iNs23rND/w8tqnuIRyblCYY a0qk6Z/NZpaVGguzqRd7jUG7lBBtB29H+/OsQ3ll+5apGfjJAKpm02d7X/nczIsInEIQ cbLI8ZbY3CCg6BQMEOIzc2oq0BCys6ZJ2LzFVjG4eCsboz2TAhb74kdRXq0acuUMr0Ai jJ6ue/eyygtfKAZvUC0H36Qjyj4cfg/gf2VqyYQ9UdrpI8ycd2mBA55So50+wfWVfKqZ duXA8JuE0L8eTX4kbbmPF8I5P8i6e2/1Z3aDqyGSXpj+MR5AK16sPn+GwC0jKcFGsiiV wbGQ== MIME-Version: 1.0 In-Reply-To: References: <1193768041.349129.26350@v3g2000hsg.googlegroups.com> Date: Thu, 6 Sep 2012 01:34:38 +1000 Subject: Re: Python Interview Questions From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1346859281 news.xs4all.nl 6852 [2001:888:2000:d::a6]:46208 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:28508 On Thu, Sep 6, 2012 at 1:22 AM, Ian Kelly wrote: > The lack of an ORDER BY is the least of the problems with that SQL. > He's also using LIMIT without OFFSET, so the only thing that the > 'item' argument changes is how many rows are returned (all but one of > which are ignored), not which one is actually fetched. No, he's using the two-arg form of LIMIT. > It's a bit sad that these are touted as answers to interview > questions. I wouldn't hire anybody who gave answers like these. The code does not work as posted; there are args missing from the INSERT example, for, uhh, example. It makes it hard to evaluate the quality of the code, in some places. I'm not sure what these posts are supposed to be, but I hope they're not being held up as model answers to interview questions. For a start, I can't find any sort of clear questions. Or is the code itself the question and "How would you improve this"? ChrisA