Hi
I hope somebody can help. I am using Python and I would like to be able to do the following.
I have a set of objects (shapes for example) and a series of commands to act on these objects. The commands have the a format of a command string followed by a variable number of parameters which can be strings or integers
For example the shape 'Rectangle' may have the following commands
'ChangeColor' 'green'
'FillStyle' 'hatch'
'Dimensions' 10 15
etc.....
What would be the best data structure to store this information. I need to be able to easily retrieve these commands from the data structure given the 'shape' of the object. Would a dictionary be the correct choice, I have never used these before
Thanks