Lawrence D’Oliveiro <lawrenced...@gmail.com> writes: > On Sunday, March 11, 2018 at 2:40:16 PM UTC+13, Ben Bacarisse wrote: >> It would be nice to avoid relying on any value-based ordering. > > I don’t see why. The set of elements has to have the same cardinality > as the set of natural numbers, after all. Why not take advantage of > that?
Maybe we are saying the same thing? The elements from which the tuple members are drawn need only be a sequence defined by a successor function. The values themselves need have no ordering nor, indeed, have any of the arithmetic properties of N. Of course you can always generate n-tuples of N and then map these to n-tuples of the intended sequence but that seems inelegant. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list