Christopher Brookes wrote:
class Power:
def __init__(self, name, desc):
self.name = name
self.desc = desc
powerAll = [
Power('Flammes infernales' , 'Embrase lenemi et le feu bruler'),
Power('Froid devorant', 'Gele lenemi sur place')]
im *WANT to display this* :
Froid devorant : Gele lenemi sur place
Flammes infernales : Embrase lenemi et le feu bruler
I don't know how to get this ? :(
for pwr in powerAll:
print pwr.name, pwr.desc
If the order really matters to you, you need to sort powerAll into
whatever order you prefer.
--
Steven
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor