Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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; 'syntax': 0.03; 'args': 0.04; 'argument': 0.04; 'subject:Python': 0.05; 'sql.': 0.07; 'rows': 0.09; 'sep': 0.09; 'cc:addr:python-list': 0.10; "wouldn't": 0.11; 'hire': 0.15; 'value.': 0.15; 'for,': 0.16; 'introduces': 0.16; 'language:': 0.16; 'limit.': 0.16; 'offset,': 0.16; 'places.': 0.16; 'sad': 0.16; 'simplest': 0.16; 'wrote:': 0.17; 'example.': 0.17; 'skip': 0.17; 'thu,': 0.17; 'code,': 0.18; 'changes': 0.20; 'file.': 0.20; 'sort': 0.21; 'bit': 0.21; 'supposed': 0.21; '(all': 0.22; 'subject:Questions': 0.22; 'cc:2**0': 0.23; '15,': 0.23; 'insert': 0.23; 'posts': 0.23; 'thus': 0.24; 'cc:no real name:2**0': 0.24; 'least': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'values': 0.26; 'am,': 0.27; 'question': 0.27; 'start,': 0.27; 'chris': 0.28; 'loop,': 0.29; 'questions.': 0.29; 'no,': 0.29; 'words': 0.29; 'source': 0.29; "i'm": 0.29; 'returned': 0.30; 'function': 0.30; 'code': 0.31; 'anybody': 0.32; 'print': 0.32; 'says': 0.33; "he's": 0.33; 'traditional': 0.33; "can't": 0.34; 'list': 0.35; 'clear': 0.35; 'ahead': 0.35; 'there': 0.35; 'but': 0.36; 'test': 0.36; 'problems': 0.36; 'itself': 0.37; 'does': 0.37; 'uses': 0.37; 'being': 0.37; 'passed': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'comment': 0.38; 'some': 0.38; 'sure': 0.38; 'there,': 0.38; 'page': 0.38; 'received:192': 0.39; 'received:192.168': 0.40; 'first': 0.61; 'evaluate': 0.62; 'more': 0.63; 'gave': 0.65; 'limit': 0.65; 'header:Reply-To:1': 0.68; 'quality': 0.69; 'lack': 0.71; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; 'confusing': 0.84; 'construct': 0.84; 'received:74.208.4.194': 0.84; 'subject:Interview': 0.84; '"how': 0.91 Date: Wed, 05 Sep 2012 12:01:13 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Chris Angelico Subject: Re: Python Interview Questions References: <1193768041.349129.26350@v3g2000hsg.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:EHC7BgbZQcmHA2gLYN+cAz3P8MtpVxq1TMZUFTD+tkY U+Q9UnaGmVO76bIdEUdNS12TFoFnBD2RC88Gr9EssSzQEMCRku 9X7JCD5ba0IZv2nwKiWAoD3fidhs8fssb4edzj6FrzHtybuH7V YcCYd83QoFoHLWJy+XBuAtnuVpX2YgF1cJKkWvLRb030DGIspN xZ4MhxCafr2sTbUIMF2kArajm+qkm8u67nYmHm/woW6OSmhX5b HlfQa9uYrbRsI80/TBGwknii3FU9dQyTj5pEnHMl2kbXkJth3E GnPG0LxFMCZpMfH/CE6nWALk5nxxdSV47bIUpcCrkXIf+Cwqw= = Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: d@davea.name 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: 46 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1346860897 news.xs4all.nl 6979 [2001:888:2000:d::a6]:57889 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:28515 On 09/05/2012 11:34 AM, Chris Angelico wrote: > 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 Skip ahead to about page 13 to get more traditional questions, There, many of the simplest questions have invalid answers, or confusing explanations. For example, on page 15, the question that says " ... if a list of words is empty..." uses a="" as its source data to test with. The first question on page 16 forgets to construct a loop, thus processing only the first line in the file. page 18 introduces new syntax to the language: print n+=1 ##will work and reassures us in the comment that it will work !! page 18 also claims that values are passed to function by value. -- DaveA