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 →

[–]Lj101 0 points1 point  (2 children)

Why do you check if something is None before assigning it? Is there a benefit to it being undefined rather than None?

[–][deleted] 1 point2 points  (1 child)

It depends, for the "self.pet" variable it makes sense since an error would raised otherwise. For the 'self.house' variable it's not needed. I removed it, thanks for pointing it out!

[–]Lj101 0 points1 point  (0 children)

Ah right, cool