Kevin wrote: > Am I missing something, or am I the only one who explicitly declares > structs in python? > > For example: > FileObject = { > "filename" : None, > "path" : None, > } > > fobj = FileObject.copy() > fobj["filename"] = "passwd" > fobj["path"] = "/etc/"
Yes, I think this is the only time I've ever seen that. I think the normal way of doing this in Python is: class FileObject(object): def __init__(self, filename, path): self.filename = filename self.path = path fobj = FileObject(filename='passwd', path='etc') STeVe -- http://mail.python.org/mailman/listinfo/python-list