itertools icon indicating copy to clipboard operation
itertools copied to clipboard

product with repeat

Open adamnemecek opened this issue 1 year ago • 1 comments

Hello, product in Python itertools can take an option repeat. It might be a good idea to add an implementation of this to itertools as well. This one seems good https://stackoverflow.com/questions/44139493/in-rust-what-is-the-proper-way-to-replicate-pythons-repeat-parameter-in-iter

adamnemecek avatar Jun 15 '24 22:06 adamnemecek

If it's about the iproduct! macro, there is #264 which is a bit abondonned at the moment and if that's without macro there is itertools::repeat_n(it, repeat).multi_cartesian_product().

Philippe-Cholet avatar Jun 16 '24 06:06 Philippe-Cholet