14/19 must be type


#1

class Employee(object):
    """Models real-life employees!"""
    def __init__(self, employee_name):
        self.employee_name = employee_name

    def calculate_wage(self, hours):
        self.hours = hours
        return hours * 20.00

# Add your code below!
class PartTimeEmployee(Employee):
    def calculate_wage(self, hours):
        self.hours = hours
        return hours * 12.00
    def full_time_wage(self,hours):
        return super(self,hours).calculate_wage()

milton = PartTimeEmployee("Milton")
print milton.full_time_wage(20)

I haven't been on in some time, so forgive me if I come off as stupid, but nevertheless I get the error:

Traceback (most recent call last):
File "python", line 19, in
File "python", line 16, in full_time_wage
TypeError: must be type, not PartTimeEmployee

What's wrong?


#2

super has no interest in a number of hours, it needs to know about which class's parents you want to use methods of and which object the methods should be bound to.

super(PartTimeEmployee, self)


#3

And you should put the argument hours in the calculate_wage() in your super call, otherwise you'll get an error.


#6