Почему следующий код конструктора Python выдает мне ошибку? ⇐ Python
-
Anonymous
Почему следующий код конструктора Python выдает мне ошибку?
class Student: college = 'usa' name = 'rahul' #error message ? def __init__(self): print('new Student is entered ...') #para cons def __init__(self, name): self.name = name a = Student() Please check what mistake i did in above code
Источник: https://stackoverflow.com/questions/781 ... -and-error
class Student: college = 'usa' name = 'rahul' #error message ? def __init__(self): print('new Student is entered ...') #para cons def __init__(self, name): self.name = name a = Student() Please check what mistake i did in above code
Источник: https://stackoverflow.com/questions/781 ... -and-error