I don't understand what you are trying to do? I'm assuming def GetAllAtrib is a method within a class; perhaps you could copy more the code base?
It seems to be locating the three elements you have in that method just fine, but I'm guessing you have another print statement somewhere that is causing it to print None. On Thu, Feb 24, 2011 at 10:48 AM, Christopher Brookes < [email protected]> wrote: > 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. > > _______________________________________________ > Tutor maillist - [email protected] > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > >
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
