Hi I'm making a kind of ordered dictionary class. It is not exactly a dictionary, but it uses a list and dictionary to store the data.
Something like: class dbase(list): '''Database class keeping track of the order and data''' def __init__(self): self.__data = {} self.__order = [] self.__uniq_id = 0 I'm just wondering if it is possible to get my class to work so that if one do: d=dbase() d.append("Data") d.append([1,2]) one can do like this to iterate over the data. for x in d: ... I'm looking at the list class but I don't quite understand from pydoc which __ __ methods I have to implement to get the above to work. Thanks in advance Preben -- http://mail.python.org/mailman/listinfo/python-list