Class bodies and match cases run at import, and the import branch of an 'if __name__ != "__main__"' guard is the body, not the else. Removals (remove, pop, clear, del) change the search path too.