[Tutor] Class

Darren Teo darrenteo82@yahoo.com
Tue Jun 17 03:44:01 2003


--0-457053929-1055835755=:16750
Content-Type: text/plain; charset=us-ascii

hey i was wondering how do you write a class ?? 
 
class Diary:
 
def __init__(self):
   self.data = []
 
def addEntry(day, month, year, text):
 
i am not sure what to write in here . this methods adds an entry for the date(day, month, year). Thanks.


---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
--0-457053929-1055835755=:16750
Content-Type: text/html; charset=us-ascii

<DIV>hey i was wondering how do you write a class ?? </DIV>
<DIV>&nbsp;</DIV>
<DIV>class Diary:</DIV>
<DIV>&nbsp;</DIV>
<DIV>def __init__(self):</DIV>
<DIV>&nbsp;&nbsp; self.data = []</DIV>
<DIV>&nbsp;</DIV>
<DIV>def addEntry(day, month, year, text):</DIV>
<DIV>&nbsp;</DIV>
<DIV>i am not sure what to write in here . this methods adds an entry for the date(day, month, year). Thanks.</DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo.yahoo.com/sbc/">SBC Yahoo! DSL</a> - Now only $29.95 per month!
--0-457053929-1055835755=:16750--