The only pythonicness hint I have is that your permute code looks like it wishes it were a generator and was written using yield instead of return. Also, tuples get sorted by first element first, and then by the second element if the first element is equal, enabling you to get away with using the builtin min() function.
Comments 1
http://pastie.org/358051
The only pythonicness hint I have is that your permute code looks like it wishes it were a generator and was written using yield instead of return. Also, tuples get sorted by first element first, and then by the second element if the first element is equal, enabling you to get away with using the builtin min() function.
Reply
Leave a comment