A simple array in Python

bg_ie at yahoo.com bg_ie at yahoo.com
Tue Jan 9 05:09:51 EST 2007


Hi,

I have the following enum -

class State:
	Fire = 0
	Water = 1
	Earth = 2

And I want a variable which holds a value for each of these states,
something like -

myState1[State.Fire] = 10
myState1[State.Earth] = 4

myState2[State.Fire] = 20
myState2[State.Earth] = 24

How do I do this?

Thanks Barry.




More information about the Python-list mailing list