Pulling my hair out ... 'super' object has no attribute 'calculate_wage'


#1

I'm sure it's something simple but I just can't figure it out.

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


class PartTimeEmployee(Employee):
    def calculate_wage(self, hours):
        self.hours = hours
        return hours * 12.00
    def full_time_wage(self, hours):
        return super(PartTimeEmployee, self).calulate_wage(self, hours)


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

Returns:

Traceback (most recent call last):
  File "python", line 21, in <module>
  File "python", line 17, in full_time_wage
AttributeError: 'super' object has no attribute 'calulate_wage'

#2

Spelling


#3

Crap. How did I not see that.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.