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 ezio.melotti
Recipients ezio.melotti, konryd, rhettinger
Date 2009-01-25.07:10:19
SpamBayes Score 1.5218174e-06
Marked as misclassified No
Message-id <1232867421.3.0.38091989471.issue5048@psf.upfronthosting.co.za>
In-reply-to
Content
It would also be nice to have a __len__ method on both permutations and
combinations.

len(permutations(sequence)) could return the number of permutations
using the formulas (e.g. n! for permutations) without generating all the
possible permutations (as opposed to something like
len(list(permutations(sequence)))).

Also, is there a way to calculate combinations with repetitions[1]?
Maybe we could add an optional argument repetitions=True/False.

[1]:
http://en.wikipedia.org/wiki/Combinations#Number_of_combinations_with_repetition
History
Date User Action Args
2009-01-25 07:10:21ezio.melottisetrecipients: + ezio.melotti, rhettinger, konryd
2009-01-25 07:10:21ezio.melottisetmessageid: <1232867421.3.0.38091989471.issue5048@psf.upfronthosting.co.za>
2009-01-25 07:10:20ezio.melottilinkissue5048 messages
2009-01-25 07:10:19ezio.melotticreate