[Python-Dev] [Python-ideas] itertools.chunks(iterable, size, fill=None)

Steven D'Aprano steve at pearwood.info
Thu Jul 5 18:09:44 CEST 2012

anatoly techtonik wrote:
>>>> Which is the 33th most voted Python question on SO -
>>>> http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python/312464
>> I am curious how you get that number. I do note that there are about 15
>> other Python SO questions that seem to be variations on the theme. There
>> might be more if 'blocks' and 'groups' were searched for.
> It's easy:
> 1. Go http://stackoverflow.com/
> 2. Search [python]
> 3. Click `votes` tab
> 4. Choose `30 per page` at the bottom
> 5. Jump to the second page, there it is 4th from the top:
> http://stackoverflow.com/questions/tagged/python?page=2&sort=votes&pagesize=30

Yes. I don't think this is particularly significant. Have a look at some of 
the questions with roughly the same number of votes:

#26 "How can I remove (chomp) a newline in Python?" 176 votes

#33 "How do you split a list into evenly sized chunks in Python?" 149 votes

#36 "Accessing the index in Python for loops" 144 votes

Being 33rd most voted question doesn't really mean much.

By the way, why is this discussion going to both python-dev and python-ideas?


More information about the Python-Dev mailing list