Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed6.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'function,': 0.07; 'referring': 0.07; '22,': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'least)': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:184.172': 0.09; 'received:gator410.hostgator.com': 0.09; 'requested.': 0.09; 'sep': 0.09; 'stated.': 0.09; '~ethan~': 0.09; '(the': 0.15; 'sat,': 0.15; 'received:69.93': 0.16; 'received:72.11': 0.16; 'received:72.11.125': 0.16; 'received:72.11.125.166': 0.16; 'simpler,': 0.16; 'task.': 0.16; 'wrote:': 0.17; 'examples': 0.18; 'keys': 0.22; 'occurs': 0.22; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'common': 0.26; 'values': 0.26; "doesn't": 0.28; 'function': 0.30; 'code': 0.31; 'comments': 0.33; 'ones,': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'point.': 0.33; 'mine': 0.35; 'pm,': 0.35; 'but': 0.36; 'bad': 0.37; 'one,': 0.37; 'does': 0.37; 'being': 0.37; 'why': 0.37; 'quite': 0.37; 'subject:: ': 0.38; 'comment': 0.38; 'mean': 0.38; 'to:addr:python.org': 0.39; 'takes': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'first': 0.61; 'solve': 0.62; 'close': 0.63; 'times': 0.63; 'due': 0.66; 'counts': 0.81; 'complexity': 0.84; 'dict.': 0.84; 'easier,': 0.84; 'received:gateway15.websitewelcome.com': 0.84; 'to:name:python': 0.84 Date: Mon, 24 Sep 2012 14:18:47 -0700 From: Ethan Furman User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Python Subject: Re: A little morning puzzle References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.10.136]) [72.11.125.166]:3150 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 2 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1348523472 news.xs4all.nl 6916 [2001:888:2000:d::a6]:58342 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:29936 Ian Kelly wrote: > On Sat, Sep 22, 2012 at 9:44 PM, Dwight Hutto wrote: >> Why don't you all look at the code(python and C), and tell me how much >> code it took to write the functions the other's examples made use of >> to complete the task. >> >> Just because you can use a function, and make it look easier, doesn't >> mean the function you used had less code than mine, so if you look at >> the whole of what you used to make it simpler, mine was on point. > > I understood the sarcastic comments (the first one, at least) to be > referring to your solution as bad not due to complexity (I actually > thought it was quite simple), but because it does not solve the > problem as stated. The problem posed by the OP was to find a set of > common keys that are associated with the same values in each dict. > Your solution takes only one predetermined key-value pair and counts > how many times it occurs in the dicts, which isn't even close to what > was requested. With your comment of "Might be better ones, though", I > actually thought that you were aware of this and were being > intentionally satirical. Unlikely. ~Ethan~