This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dennis Sweeney
Recipients Dennis Sweeney, latot
Date 2021-05-20.23:37:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621553869.37.0.566929667162.issue44197@roundup.psfhosted.org>
In-reply-to
Content
How is proposed_function("abcd", max_repeat=3) any different from what you can currently spell as combinations("aaabbbcccddd") ? Or, more generally,

def proposed_function(it, repeats)
    repeated = chain.from_iterable([x] * repeat for x in it)
    return combinations(repeated)

This can easily generalize to specifying the max count of each item.
History
Date User Action Args
2021-05-20 23:37:49Dennis Sweeneysetrecipients: + Dennis Sweeney, latot
2021-05-20 23:37:49Dennis Sweeneysetmessageid: <1621553869.37.0.566929667162.issue44197@roundup.psfhosted.org>
2021-05-20 23:37:49Dennis Sweeneylinkissue44197 messages
2021-05-20 23:37:49Dennis Sweeneycreate