Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Michael Torrie Newsgroups: comp.lang.python Subject: Re: Cannot step through asynchronous iterator manually Date: Sat, 30 Jan 2016 15:19:18 -0700 Lines: 24 Message-ID: References: <56AD122F.2030904@gmail.com> <56AD31E7.50407@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 0/Wft+d3NfIfbykgdT5xUQoRfli2W2XrtSyiaaHFSuUw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'column': 0.07; 'rows,': 0.09; 'sql,': 0.09; 'underlying': 0.09; 'violates': 0.09; "(you're": 0.16; 'async': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'functions.)': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'spec,': 0.16; 'wrote:': 0.16; 'seems': 0.23; 'examples': 0.24; 'header:In-Reply- To:1': 0.24; 'header:User-Agent:1': 0.26; 'chris': 0.26; 'compatible': 0.27; "we're": 0.30; 'supposed': 0.31; 'entry': 0.31; "can't": 0.32; 'table': 0.32; 'maybe': 0.33; 'problem': 0.33; 'message-id:@gmail.com': 0.34; 'handle': 0.34; 'could': 0.35; 'clear': 0.35; 'mix': 0.35; 'but': 0.36; 'to:addr:python- list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'several': 0.38; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'some': 0.40; 'here.': 0.62; 'charset:windows-1252': 0.62; 'other.': 0.64; 'combining': 0.66; 'talking': 0.67; 'groups.': 0.72; 'hand,': 0.97 X-Virus-Scanned: amavisd-new at torriefamily.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: 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: , Xref: csiph.com comp.lang.python:102320 On 01/30/2016 03:06 PM, Chris Angelico wrote: > That actually violates the SQL spec. Some servers will accept it, > others won't. (You're not supposed to mix column functions and > non-column functions.) Are you sure? Wikipedia is not always the most accurate place, but they have several clear examples on the SQL page of combining table fields with count() listed. This is straight SQL we're talking about here, not a particular implementation or dialect. Maybe there're some subtleties at play here. > It also can't cope with 'group by' queries, as > it'll count the underlying rows, not the groups. I also suspect it > can't handle join queries. The Wikipedia entry on SQL, which seems to be based in some grounding of the spec, shows that count(), joins, and group by are all compatible with each other. So I dunno! > The original approach is still the most general, and IMO the best. Could be. On the other hand, letting the DB do it all solves his problem without mucking about with async iterators.