Scott David Daniels wrote: > raise ValueError('Samplng more than %d without replacement?' % ( > sum(1 for w in weights)))
That would be len(weights) > There were two mistakes, both related to the definition of combined: > (1) Combined only holds positive values, so testing in sum is silly. but I think your first version was correct; I don't see were you remove the 0-items from weights. Peter -- http://mail.python.org/mailman/listinfo/python-list