> I am often driven to use, for example, itertools set(permutations(multiset, n))

Try the more-itertools package: https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.distinct_permutations

from more_itertools import distinct_permutations from collections import Counter
c = Counter('abracadabra’)
print(list(distinct_permutations(c.elements(), 3)))


> there is little if any solid evidence that they do what they claim to do (

The code in more-itertools is trustworthy. Also the docs have links to the source, so you can just read the code and let it earn your trust.


Raymond