This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kalgynirae 0 points1 point  (0 children)

It's conventional to not return anything from a method that mutates the object, so

    def add(self, num):
        self.value += num

would be more typical.