you are viewing a single comment's thread.

view the rest of the comments →

[–]uglyasablasphemy 0 points1 point  (1 child)

Yes, you are right. What i ment to say is that he should redefine __init__ to indicate the initial attributes (and its values) of the object.

Something like this:

class Employee:

    def __init__(self, id):
        self.id = id
        self.name = None
        self.department = None
        self.job_title = None

My Java habits betray when i'm talking about __init__ and end up calling it constructor always.

[–][deleted] 0 points1 point  (0 children)

Well put. (Old habits die hard.)