and must route those it does not manage to the superclass fetcher to avoid loopsc:\codepy - getattr- -getattr py getattr getattr getattr getattr although __getattribute__ can catch more attribute fetches than __getattr__in practice they are often just variations on theme--if attributes are not physically storedthe two have the same effect management techniques compared to summarize the coding differences in all four attribute management schemes we've seen in this let' quickly step through somewhat more comprehensive computed-attribute example using each techniquecoded to run in either python or the following first version uses properties to intercept and calculate attributes named square and cube notice how their base values are stored in names that begin with an underscoreso they don' clash with the names of the properties themselvestwo dynamically computed attributes with properties class powers(object)def __init__(selfsquarecube)self _square square self _cube cube def getsquare(self)return self _square * def setsquare(selfvalue)self _square value square property(getsquaresetsquaredef getcube(self)return self _cube * cube property(getcubex powers( print( squareprint( cubex square print( square * * * managed attributes need (objectin only _square is the base value square is the property name