Error Raised But dont know what it means

David Anderson zerty.david at gmail.com
Sun Mar 30 22:07:46 CEST 2008


Here is the code:
This one raises the error:
def criaLista(self):
        self.listbox.Clear()
        for dupla in self.duplas:
            self.listbox.Append(dupla.__str__())

This one works well but doesn't raises error

dupla1 = Duplas("2422", "2455")
dupla2 = Duplas("454", "15")
list = []
list.append(dupla1)
list.append(dupla2)
erros = ErrorMgr()
erros.geraErro("1", "erro idiota", 2.2)
dic = {1:dupla1, 2:dupla2}
a = Arquivos("batata.txt")
a.saveFile(list, erros, dic)
a.openFile()
lista = a.getListaDuplas()
e = a.getErrorsManager()
d = a.getDicDuplas()

for i in lista:
    print i

print d[1]

On Sun, Mar 30, 2008 at 5:03 PM, David Anderson <zerty.david at gmail.com>
wrote:

> Well, I'm dealing with files in Pickle, I'm saving at the file a List of
> Objects from the same Class, When I try to retrive this information and try
> to iterate over them this error is raised:
> TypeError: 'instancemethod' object is not iterable
>
> But if I just print the method I get the 'real thing' what's the problem?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080330/6396b1ff/attachment.html>


More information about the Python-list mailing list