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


Groups > comp.lang.python > #29893

Re: A little morning puzzle

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 2012-09-23 22:51 -0600
Subject Re: A little morning puzzle
Newsgroups comp.lang.python
Message-ID <mailman.1180.1348462346.27098.python-list@python.org> (permalink)

Show all headers | 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