1
I have the following error when compiling:
Exception has occurred: TypeError
__init__() missing 2 required positional arguments: 'usuario' and 'senha'
What I’m doing wrong?
class Login:
usuario = str(input("Digite seu usuário: "))
senha = input("Digite sua senha: ")
def __init__(self, usuario, senha):
self.usuario = usuario
self.senha = senha
def retorno_usuario(self):
return self.usuario
def retorno_senha(self):
return self.senha
log = Login()
print("O usuário e: {}").format(log.usuario)
print("O usuário e: {}").format(log.senha)
Thanks, man!
– imaestri
The following is an interesting reading on "interpretation vs compilation": https://stackoverflow.com/a/6889798
– hkotsubo
I agree that the vm python
transpila
the code forbytecode
at runtime however this does not make python a compiled language since it does not generate a binary that after the build process will be executed by the target processor. Python is a interpreted language thattranspilada
forbytecode
and tbm can be compiled in C.– gorn