when the recur import resumesthe second from finds the name in recur (it' been run completely)so no error is reported running file as script is not the same as importing it as modulethese cases are the same as running the first import or from in the script interactively for instancerunning recur as script worksbecause it is the same as importing recur interactivelyas recur is the first module imported in recur running recur as script fails for the same reason--it' the same as running its first import interactively part viclasses and oop see "test your knowledgepart vi exerciseson page in for the exercises inheritance here' the solution code for this exercise (file adder py)along with some interactive tests the __add__ overload has to appear only oncein the superclassas it invokes type-specific add methods in subclassesclass adderdef add(selfxy)print('not implemented!'def __init__(selfstart=[])self data start def __add__(selfother)return self add(self dataotheror in subclassesor return typeclass listadder(adder)def add(selfxy)return class dictadder(adder)def add(selfxy)new {for in keys()new[kx[kfor in keys()new[ky[kreturn new python from adder import adder( add( not implementedx listadder( add([ ][ ][ dictadder( add({ : }{ : }{ adder([ ]part viclasses and oop