[Tutor] pytunes (Was __slots__, struct, etc.)

John Fouhy john at fouhy.net
Fri Oct 21 00:03:57 CEST 2005


Hmm, neat. I don't have any feedback for you on your code, but since
you're working with this sort of thing, I have a puzzle for you:

Suppose you have a collection of MP3 files.  You want to build a
random playlist, subject to the condition that tracks by the same
artist are as far apart as possible.  You can assume you have the
track / artist data in any structure you like.  How would you do this?

(I have a solution, but I don't think it is optimal.  In fact, I'm not
sure how to actually define "optimal" here... And so I am interested
in how other people would solve this problem :-) )

--
John.


More information about the Tutor mailing list