Derivative of string as a name of list or dictionary (or class?)

Roman Tarantowicz rtaranto at interia.pl
Fri Jul 26 11:49:52 EDT 2002


I received string1, string2, ... etc from handle_data in
MyParser(SGMLParser)

I dont know how to create list or dictionary which name be derivative
of the received string? 

I would like to have the following containers:

Top_Category = [derivative_of_string1, derivative_of_string2, ...]

Derivative _of_string1 = [derivative_of_another_string1,
derivative_of_another_string2, ...]

Derivative_of_another_string1 = {'id1': 'str1', 'id2' : 'str2', ...}

Is this any direct method or I have to apply something complicated as
a Factory Pattern (is it possible to automate producing new classes
which
names will be given during execution of program)?
Any tips or direction in which my mind should be pushed I'll embrace
wholeheartedly ;)



More information about the Python-list mailing list