> 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 
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/GQQDVWYY5JPGEBL7DY33O4IZGD6ADLDV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to