<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I am playing with the Netflix recommendation system which involves 17K+files and massive amounts of data.<br><br>I want to represent (and save) the parsed data in various forms and Python like classes would be perfect.<br><br>Should I use defstruct or classes? classes seem complicated and not exactly as classes in other languages.<br><br>I want to represent Customer as:<br><br>class Customer:<br> def __init__(self, idnumber):<br> self.idnbr = idnumber<br> self.reviews = []<br><br> def addReview(self, review):<br> self.reviews.append(review)<br><br> def hasReview(movieId):<br> doSomething<br> <br><br></td></tr></table><br>
<hr size=1>
Går det långsamt? Skaffa dig en snabbare bredbandsuppkoppling.<br>
<a href=http://www.kelkoo.se/c-100015813-bredband.html?partnerId=96914325>Sök och jämför priser hos Kelkoo.</a>