Hi I am having a problem with a code I wrote. I am trying to make a class and import it to another file but a error keeps coming up. Here is my code:
File1 (With class):
class Employee:
def __init__(self, Number, employeeName, Address, Wage, Time):
self.Staff = self
self.employeeNum = Number
self.Name = employeeName
self._Address = Address
self.Wage = Wage
self.workTime = Time
def getInfo():
return(_employeeNum,__Address)
def setInfo(newNumber):
if newNumber > 6:
self._employeeNum = newNumber
File2(Importing class):
from Project7 import Employee as e
Emp1 = e.__init__("Employee", "6765", "John", "123 Baker Street", 13.00, 15)
print(Employee)
print(Emp1)
I am not sure what is happening and any info would be really helpful! Thanks in advance!