def content(self)if not self _contentprint("retrieving new page "self _content urlopen(self urlread(return self _content we can test this code to see that the page is only retrieved onceimport time webpage webpage(now time time(content webpage content retrieving new page time time(now now time time(content webpage content time time(now content =content true was on an awful satellite connection when originally tested this code and it took seconds the first time loaded the content the second timei got the result in seconds (which is really just the amount of time it took to type the lines into the interpretercustom getters are also useful for attributes that need to be calculated on the flybased on other object attributes for examplewe might want to calculate the average for list of integersclass averagelist(list)@property def average(self)return sum(selflen(selfthis very simple class inherits from listso we get list-like behavior for free we just add property to the classand prestoour list can have an averagea averagelist([ , , , ] average