On Sat, Sep 10, 2011 at 5:43 PM, Dr. Phillip M. Feldman <phillip.m.feld...@gmail.com> wrote: > I've written a recursive class that creates an iterator to solve a general > formulation of the combinatorics problem known as "balls in numbered boxes" > (also known as "indistinguishable balls in distinguishable boxes"). The > code has been extensively tested and appears to work, but isn't terribly > elegant. Any suggestions about how to improve it will be appreciated.
Significantly refactored (but untested) version: https://gist.github.com/1209079 Cheers, Chris -- http://rebertia.com -- http://mail.python.org/mailman/listinfo/python-list