Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #28507
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.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.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'argument': 0.04; 'subject:Python': 0.05; 'encouraging': 0.07; 'mysql,': 0.07; 'sql.': 0.07; '(although': 0.09; 'postgresql,': 0.09; 'received :mail-lpp01m010-f46.google.com': 0.09; 'rows': 0.09; 'sep': 0.09; "wouldn't": 0.11; 'hire': 0.15; 'expect,': 0.16; 'iterating': 0.16; 'length,': 0.16; 'offset,': 0.16; 'parameter,': 0.16; 'plus,': 0.16; 'sad': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'code,': 0.18; 'changes': 0.20; 'bit': 0.21; '(all': 0.22; 'subject:Questions': 0.22; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'separate': 0.27; 'message-id:@mail.gmail.com': 0.27; 'chris': 0.28; 'trouble': 0.28; 'run': 0.28; 'far.': 0.29; 'questions.': 0.29; 'unlikely': 0.29; 'probably': 0.29; 'query': 0.30; 'received:209.85.215.46': 0.30; 'returned': 0.30; 'system,': 0.32; 'anybody': 0.32; "he's": 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'same.': 0.35; 'table': 0.35; 'received:209.85': 0.35; 'really': 0.36; 'but': 0.36; 'problems': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; "you'll": 0.62; 'gave': 0.65; 'limit': 0.65; 'frequently': 0.65; 'lack': 0.71; 'guaranteed': 0.76; 'subject:Interview': 0.84; 'to:name:python': 0.84; 'inefficient': 0.91 |
| 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=5V8CsxZeMv82/t5Ea5Gg3aakEX4LWNR2qsCAA6Q/jng=; b=tYzu5K7+oOkVY4OS4/p/QxIIn01q8K6zEyc9YNgnczmRnkbF8n1eWOmpMZn9U1BqEl JUdV/9OAqUSoLmg9LommVF1hwtRwdhfIYG/uJCYgikbUeEo/JxZZj0OjulZRWSMOz7vQ 6FX3CpUc951pk78y0CGaTF+tdNavWA/D595lTAT40zqeA6VO18vrEOAWeDc7RVWWUWjo qe/fqGjXZkIbPAVZ6qczwelw8wmE93k0JdHA7NPu+wepW1rEWMarpGhB7t66yh4OUM+V 1aNvseg+Vh6v1OE+kh3z5EwDt8FCp0KMazcP9xTxzNJ5v6GvEnEHNLC5vt+RvR4nSqDc UcZA== |
| MIME-Version | 1.0 |
| In-Reply-To | <CAPTjJmodQMDkrWvhWSWtcg3j4+aH+jTGEX6rgAjFhV6mVLR+xw@mail.gmail.com> |
| References | <1193768041.349129.26350@v3g2000hsg.googlegroups.com> <d4e47e64-91d3-4b9f-9e98-4985cd8cb936@googlegroups.com> <k27n53$3kp$1@ger.gmane.org> <CAPTjJmodQMDkrWvhWSWtcg3j4+aH+jTGEX6rgAjFhV6mVLR+xw@mail.gmail.com> |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | Wed, 5 Sep 2012 09:22:58 -0600 |
| Subject | Re: Python Interview Questions |
| To | Python <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 <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.245.1346858610.27098.python-list@python.org> (permalink) |
| Lines | 22 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1346858610 news.xs4all.nl 6853 [2001:888:2000:d::a6]:37041 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:28507 |
Show key headers only | View raw
On Wed, Sep 5, 2012 at 8:34 AM, Chris Angelico <rosuav@gmail.com> wrote: > I wouldn't go that far. The 'name' parameter, I would expect, would be > a constant. The 'item' parameter, though, is probably not a constant, and it's interpolated just the same. > However, this strikes me as encouraging some really > inefficient code, like iterating over all the rows in a table with N+1 > queries (one to get the length, then a separate query for each row). > Plus, use of limit without order by is not guaranteed (although since > this is specific to MySQL, it's unlikely you'll run into trouble - but > PostgreSQL, with its MVCC storage system, frequently reorders rows in > a table). 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. It's a bit sad that these are touted as answers to interview questions. I wouldn't hire anybody who gave answers like these.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Python Interview Questions charvigroups@gmail.com - 2012-09-04 23:50 -0700
Re: Python Interview Questions Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2012-09-05 14:10 +0530
Re: Python Interview Questions Peter Otten <__peter__@web.de> - 2012-09-05 16:21 +0200
Re: Python Interview Questions Chris Angelico <rosuav@gmail.com> - 2012-09-06 00:34 +1000
Re: Python Interview Questions Chris Angelico <rosuav@gmail.com> - 2012-09-06 00:36 +1000
Re: Python Interview Questions Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-05 09:22 -0600
Re: Python Interview Questions Roy Smith <roy@panix.com> - 2012-09-05 12:38 -0400
Re: Python Interview Questions Chris Angelico <rosuav@gmail.com> - 2012-09-06 01:34 +1000
Re: Python Interview Questions Dave Angel <d@davea.name> - 2012-09-05 12:01 -0400
Re: Python Interview Questions Roy Smith <roy@panix.com> - 2012-09-05 12:11 -0400
Re: Python Interview Questions Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-05 10:40 -0600
Re: Python Interview Questions Roy Smith <roy@panix.com> - 2012-09-05 12:45 -0400
Re: Python Interview Questions Chris Angelico <rosuav@gmail.com> - 2012-09-06 08:13 +1000
Re: Python Interview Questions Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2012-09-06 09:54 +0530
Re: Python Interview Questions MRAB <python@mrabarnett.plus.com> - 2012-09-06 12:38 +0100
csiph-web