Alex Hall wrote:
On 2/24/11, Christopher Brookes <chris.klai...@gmail.com> wrote:
Hi i would like to display all the field of my powerAll like this :
Choose a power :
Froid devorant : Embrase lenemi et le feu bruler
Flammes infernales : 'Gele lenemi sur place
-----------------------------
class Character():
def ChoosePouvoirUnique(self):
print ("Choose a power")
for Power in powerAll:
print (Power)
You need a __init__() function in this class, as with any class.
That's not strictly correct. You don't *need* an __init__ method, unless
your class needs to be initialised. Most classes will, but some do not.
[...]
Also, "for" should be lowercase, though I am
honestly not sure that this is a requirement(though I believe it is).
It certainly is. Python is case sensitive, so "for" and "FOR" and "For"
are different. "for" is a Python keyword with special meaning. The
others are just words with no special meaning.
--
Steven
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor