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!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.032 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'function,': 0.07; 'referring': 0.07; '22,': 0.09; 'least)': 0.09; 'requested.': 0.09; 'sep': 0.09; 'stated.': 0.09; '(the': 0.15; 'sat,': 0.15; '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; 'common': 0.26; 'values': 0.26; 'message-id:@mail.gmail.com': 0.27; "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; 'received:google.com': 0.34; 'mine': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'bad': 0.37; 'one,': 0.37; 'does': 0.37; 'being': 0.37; 'why': 0.37; 'quite': 0.37; 'received:209': 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; 'to:name:python': 0.84 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=0inj4VmP/ShSVXa7PdPUedQxy52tTU/kxRu0ubcmfEQ=; b=OK59La0ai1eK8zlE05ZFGbM7nCbI3LQHASVCimlhsb2aT5eZ2gBGh2BzgcMyFxaSyE x6OHE0E/SvSia3rt4WUowawzbOtidxIO4Z5+H1AxlZLRyTWNTf//Pea5rw75dGs98d13 nFBPy3ufzCVjpk5lb4AfjT9x1CMPX9fYokTKXtZtyplv7oCZa7XFNw++Mkg/j+Jgqd/Y mbJIQ3h48xzQdaiphn7vhkqKkwaMVxOH9dTZgKnmEDmPiRrkyKLADt6JnS5mHQUNnv4l 2a/punlvWu93jL8UDEqDxyFwthOa1vqD98dSOzfG4qEOTf8wEQ3mz9ZuSbDghWVntC6f jOwQ== MIME-Version: 1.0 In-Reply-To: References: From: Ian Kelly Date: Sun, 23 Sep 2012 22:51:53 -0600 Subject: Re: A little morning puzzle To: Python 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1348462346 news.xs4all.nl 6895 [2001:888:2000:d::a6]:52012 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:29893 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.