You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that Combinations class does not support those with replacement, which would a nice feature to have.
Proposed Solution
Add a keyword argument like replacement= with default value False (current behavior), setting which to True will produce combinations with replacement.
Problem Description
It appears that
Combinations
class does not support those with replacement, which would a nice feature to have.Proposed Solution
Add a keyword argument like
replacement=
with default valueFalse
(current behavior), setting which toTrue
will produce combinations with replacement.Alternatives Considered
Alternative is
itertools.combinations_with_replacement()
function.Additional Information
Ordered combinations with and without replacement are supported via
Tuples
andPermutations
classes respectively.Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: