A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-April/072512.html below:

[Python-Dev] function for counting items in a sequence

[Python-Dev] function for counting items in a sequence [Python-Dev] function for counting items in a sequenceKevin Jacobs <jacobs@bioinformed.com> bioinformed at gmail.com
Sun Apr 8 05:12:21 CEST 2007
On 4/7/07, Guido van Rossum <guido at python.org> wrote:
>
> On 4/7/07, Adam Olsen <rhamph at gmail.com> wrote:
> > On 4/7/07, Steven Bethard <steven.bethard at gmail.com> wrote:
> > > Here's a patch implementing collections.counts() as suggested above:
> >
> > The name doesn't make it obvious to me what's going on.  Maybe
> > countunique()?  Some other options are countdistinct() and
> > countduplicates().
>
> -1. I like the name that Steve proposed just fine; "counts" perfectly
> explain that it produces counts of items. If there couldn't be
> duplicates then "counts" wouldn't make sense since the only outcomes
> would be True or False (present or not).
>


I call that function 'tally'.

-Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20070407/f1ee686a/attachment.htm 
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4