Re: A simple array in Python

2007-01-09 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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

Re: A simple array in Python

2007-01-09 Thread Laszlo Nagy
[EMAIL PROTECTED] wrote: > 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 - > class State: Fire = 0 Water = 1 Earth = 2 m

A simple array in Python

2007-01-09 Thread bg_ie
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 d