[issue12961] unlabelled balls in boxes

Mark Dickinson report at bugs.python.org
Mon Sep 12 14:21:39 CEST 2011


Mark Dickinson <dickinsm at gmail.com> added the comment:

> "unlabelled balls in labelled boxes with capacity limits"

Out of curiosity, what was the application that you needed this for?

This one feels a bit too specialized to me to be worth adding to the itertools library;  I see itertools more as providing a collection of general-purpose tools that the user can combine for specific situations, and it's easy to do the above with itertools.combinations plus some filtering of the results to satisfy the capacity constraints.  Admittedly, that's less-efficient than a custom-built recursive solution.

----------
assignee:  -> rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12961>
_______________________________________


More information about the Python-bugs-list mailing list