can't generate iterator from list

Dr. Phillip M. Feldman Phillip.M.Feldman at
Sat Sep 10 15:57:21 EDT 2011

Very nice explanation!  I've circumvented the problem by returning a
`deepcopy` of the list.  I've also added an acknowledgment.  The revised
code is attached.

I'd like to see both balls in numbered boxes (this code) and balls in
unnumbered (indistinguishable) boxes in Python's `itertools` module, but
don't know whom to contact about this.  Also, I haven't yet worked out a
good algorithm for balls in unnumbered boxes.  Any suggestions will be

View this message in context:
Sent from the Python - python-list mailing list archive at

More information about the Python-list mailing list