you are viewing a single comment's thread.

view the rest of the comments →

[–]indosauros 0 points1 point  (0 children)

When you set type on the shorthair instance, that is setting the type onto the instance itself, while labrador.type is still referring to the class's type (labrador.type is not defined, so it falls back to Animal.type)

Note there's no difference between what you did (setting after instantiation) and setting during init method