This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients josh.r, mark.dickinson, rhettinger, steven.daprano, tim.peters
Date 2019-02-08.17:56:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1549648564.54.0.690550451617.issue35904@roundup.psfhosted.org>
In-reply-to
Content
+1 from me as well.

I like your count() solution because 1) it gives the same answer for both an iterator and for an iterable 2) it preserves the memory friendly characteristics of iterators, 3), it is still reasonably fast, and 4) the function signature is still simple.

My top name preference is "fmean" because I'm used to "isqrt" for integers, "fsqrt" for floats, and "cmath" for complex where the first letter means the type.  Incidentally, that is why "fsum" is named with an "f". My second choice is "fastmean" without an underscore.  To my ear, "float_mean" is confusing, as if "float" were a verb and "mean" were the direct object, the antonym of "sink_mean" ;-)
History
Date User Action Args
2019-02-08 17:56:05rhettingersetrecipients: + rhettinger, tim.peters, mark.dickinson, steven.daprano, josh.r
2019-02-08 17:56:04rhettingersetmessageid: <1549648564.54.0.690550451617.issue35904@roundup.psfhosted.org>
2019-02-08 17:56:04rhettingerlinkissue35904 messages
2019-02-08 17:56:04rhettingercreate