[Tutor] Storing information as attributes or as a dictionary

2012-09-28 Thread Michiel de Hoon
Dear all, Suppose I have a parser that parses information stored in e.g. an XML file. I would like to store the information contained in this XML file as a Python object. One option is to create a class like this: class Record(object): pass and store the information in the XML file as att

[Tutor] Storing information as attributes or in a dictionary

2012-09-18 Thread Michiel de Hoon
Dear all, Suppose I have a parser that parses information stored in e.g. an XML file. I would like to design a Python class to store the information contained in this XML file. One option is to create a class like this: class Record(object): pass and store the information in the XML file