Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #29893

Re: A little morning puzzle

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 <ian.g.kelly@gmail.com>
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 <CA+vVgJVbkYc=O_fhkSNGPKwF80Jg6X7LTOvdQAJ_agoOQbLOVg@mail.gmail.com>
References <k3c9jb$2gr$1@ger.gmane.org> <CA+vVgJXh2PyeAT5LdWD6twijHPhmAoL9UPJxj+QJXvmey-WAgQ@mail.gmail.com> <mailman.911.1348056502.27098.python-list@python.org> <evH6s.1159$U54.270@newsfe01.iad> <CA+vVgJVbkYc=O_fhkSNGPKwF80Jg6X7LTOvdQAJ_agoOQbLOVg@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Sun, 23 Sep 2012 22:51:53 -0600
Subject Re: A little morning puzzle
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.1180.1348462346.27098.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Sat, Sep 22, 2012 at 9:44 PM, Dwight Hutto <dwightdhutto@gmail.com> 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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: A little morning puzzle Peter Otten <__peter__@web.de> - 2012-09-19 14:09 +0200
  Re: A little morning puzzle Tobiah <toby@tobiah.org> - 2012-09-20 09:28 -0700
    Re: A little morning puzzle Dwight Hutto <dwightdhutto@gmail.com> - 2012-09-22 23:44 -0400
      Re: A little morning puzzle alex23 <wuwei23@gmail.com> - 2012-09-23 20:46 -0700
        Re: A little morning puzzle Dwight Hutto <dwightdhutto@gmail.com> - 2012-09-24 17:22 -0400
        RE: A little morning puzzle "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-09-27 17:58 +0000
    Re: A little morning puzzle Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-23 22:51 -0600
    Re: A little morning puzzle Ethan Furman <ethan@stoneleaf.us> - 2012-09-24 14:18 -0700
    Re: A little morning puzzle Dwight Hutto <dwightdhutto@gmail.com> - 2012-09-24 18:07 -0400
    Re: A little morning puzzle Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-24 17:01 -0600
    Re: A little morning puzzle Dwight Hutto <dwightdhutto@gmail.com> - 2012-09-24 19:13 -0400

csiph-web