This is the continuation of Part. 1 1 — Checking for a type with “==”. There are some rare cases where you do want to do this, but most of the time this is not what you want. the reason is inheritance. a named tuple is a tuple, so this Point class is a tuple. But it’s not literally the built-in tuple, it’s a subclass. In most cases, you should program in a way where you should be able to substitute a subclass for its parent. This is called the Liskov substitution principle, and checking a type for equality
violates it. In most cases, what you probably wanted instead was an instance check.