From: Jeremy Bopp Date: 2010-10-25T04:33:28+09:00 Subject: Re: Utilizing data from a csv file On 10/24/2010 02:14 PM, Paul Roche wrote: >> You're farther along, but you're still missing something important that >> would allow you to reduce this further. What are the kinds of items in >> the songs list you pass into the build_all method? Are they arrays of >> strings, numbers, or something else? >> >> -Jeremy > > The larger implementation of this will have strings and numbers Am I correct that the answer to my question is that you are passing an array of Song instances to the build_all method? If so, what are you planning to do that would change that? I remember from your earlier code example from the earlier thread that you seem to be trying to define per-user libraries of some kind where you have one CSV file with a list of songs and another CSV file with a list of people. IIRC, your implementation there was trying to link the two lists via an ID column shared between the two CSV files. If this is your goal, I don't understand how this will change your method of loading the songs CSV file. Yeah, you'll add some fields to your Song implementation, but that shouldn't require you to move the instantiation code into a class method of Song any more than your current implementation does. -Jeremy