Posts by Eduarda Goulart • 81 points
4 posts
-
4
votes2
answers21590
viewsA: What is the function of "Try" and "except"
The idea of Try except is to test critical points of code, i.e., places where there is great possibility of errors. They are widely used in reading files or user input data. For example, you want…
pythonanswered Eduarda Goulart 81 -
1
votes1
answer935
viewsA: pylint E1101:Class 'User' has no 'Objects' Member
The User class in models.py needs to have the user attribute to work. If you have it, put dunderscore between the attribute name and the filter. res = User.objects.filter(user__nome=value)…
-
2
votes3
answers4127
viewsA: Calling attributes of an object in another class in python
For example in a file called person.py, you have the People class and want to call it in a main.py file main py. class Usuario: def __init__(self): self.pessoa = Pessoa() If you want to call in a…
-
1
votes2
answers166
viewsA: help with indentation that is generating error in python 3.6
The position is not being incremented in the loop of the while while contador2 <= contador: print(cursos[posicao]) posicao = posicao +1