[Tutor] Python object
Christopher Brookes
chris.klaitos at gmail.com
Thu Feb 24 16:48:20 CET 2011
Hi, i'm new in python.
I'm trying to create a small fight program in object.
I've created __init__ (its works) but when i'm trying to display init param
i'm getting param and "None" every time. Why ?
def GetAllAtrib(self):
print '-----------------------------------------------'
print self.name
print self.description
print self.type
print '-----------------------------------------------'
give ->>
-----------------------------------------------
Klaitos
Soldier very strong
Soldier
-----------------------------------------------
*None *<<<<<<<<-- WHY ARE U HERE
??
Yours,
--
Brookes Christopher.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110224/f319f4f4/attachment.html>
More information about the Tutor
mailing list