Prints e strings dando erro

Re: Prints e strings dando erro

by José Coelho de Pina -
Number of replies: 0

A mensagem de erro diz que na linha 211 do método __str__() a variável texto foi usada ser ter sido criada.

Traceback (most recent call last):
File "<pyshell#72>", line 1, in 
print(lista[0])
File "C:\Users\matheus.cunha.CEC\Desktop\esqueleto_tokeniza.py", line 211, in __str__
return texto
UnboundLocalError: local variable 'texto' referenced before assignment