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


Groups > comp.lang.python > #62026

Re: Comparing values of counter in python 3.3

From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Comparing values of counter in python 3.3
Date 2013-12-16 09:20 +0000
References <7b7028b8-5de0-4a3a-a23b-2e19fe859955@googlegroups.com> <l8lmq6$6ps$1@dont-email.me> <905d6e7e-6748-42dd-8b63-d80a4d175914@googlegroups.com> <roy-46969D.21405715122013@news.panix.com>
Newsgroups comp.lang.python
Message-ID <mailman.4189.1387185660.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 16/12/2013 02:40, Roy Smith wrote:
> In article <905d6e7e-6748-42dd-8b63-d80a4d175914@googlegroups.com>,
>   rusi <rustompmody@gmail.com> wrote:
>
>> On Monday, December 16, 2013 7:29:31 AM UTC+5:30, alex23 wrote:
>>>> # Need to compare values of counter and reject in function/routine in
>>>> value in counter2 is higher then value in counter1 for a current key
>>
>>>       [(k,Counter2[k]) for k in Counter2 - Counter1]
>>
>> Why not just?
>>
>> Counter2 - Counter1
>>
>> And if you want to uncounterify it then
>> dict(Counter2 - Counter1)
>>
>>> Counters are awesome.
>>
>> Yes -- agreed. But 'counter' is a strange name -- after checking whether
>> 'bag' and 'multiset' are there in the library, I would not think to
>> check anything else.
>
> Bag and multiset are names only CS weenies would think to look for.
> Counter is the name for the rest of us :-)
>

Give me bag or multiset any day of the week, it's blatantly obvious what 
they do.  Counter, what the heck? :)

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

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


Thread

Comparing values of counter in python 3.3 Amjad Syed <amjadcsu@gmail.com> - 2013-12-11 23:49 -0800
  Re: Comparing values of counter in python 3.3 Wolfgang Maier <xpysol@gmail.com> - 2013-12-12 01:55 -0800
    Re: Comparing values of counter in python 3.3 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-12 10:11 +0000
  Re: Comparing values of counter in python 3.3 alex23 <wuwei23@gmail.com> - 2013-12-16 11:59 +1000
    Re: Comparing values of counter in python 3.3 rusi <rustompmody@gmail.com> - 2013-12-15 18:32 -0800
      Re: Comparing values of counter in python 3.3 Chris Angelico <rosuav@gmail.com> - 2013-12-16 13:37 +1100
      Re: Comparing values of counter in python 3.3 Roy Smith <roy@panix.com> - 2013-12-15 21:40 -0500
        Re: Comparing values of counter in python 3.3 rusi <rustompmody@gmail.com> - 2013-12-15 19:28 -0800
        Re: Comparing values of counter in python 3.3 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-16 09:20 +0000
      Re: Comparing values of counter in python 3.3 Devin Jeanpierre <jeanpierreda@gmail.com> - 2013-12-16 01:50 -0800

csiph-web