Name mangling transforms a class attribute with two leading underscores by incorporating the defining class name. Use it when a class may be subclassed and an attribute should not be accessed by subclasses, helping prevent accidental name collisions. section 2.3.1
Protecting catalogue state
An initial Catalogue uses _booklist for its stored books. When subclasses are introduced, rename that attribute to __booklist to discourage subclass access; Python then mangles the name with Catalogue. The single-underscore _is_match() method remains non-public by convention. section 2.3.1


