Python - How can we fix TypeError: __init__() missing 1 required positional argument: 'value' ? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Python - How can we fix TypeError: __init__() missing 1 required positional argument: 'value' ?

class A: def __init__(self, value): self.value = value class B(A): def __init__(self, value2): super().__init__() zzz = B(123) print(zzz.value)

6th Oct 2020, 9:06 PM
Solus
Solus - avatar
1 Resposta
+ 3
class A: def __init__(self, value): self.value = value class B(A): def __init__(self, value): super().__init__(value) zzz = B(123) print(zzz.value)
6th Oct 2020, 9:25 PM
šŸ’”Arno Gevorgyan šŸ
šŸ’”Arno Gevorgyan šŸ - avatar