On Sat, 31 Dec 2005 21:21:29 +0000, Dennis Lee Bieber wrote: > On Sat, 31 Dec 2005 11:37:38 +1100, Steven D'Aprano > <[EMAIL PROTECTED]> declaimed the following in > comp.lang.python: > >> >> Do you mean something like this? >> >> # Module care_and_feeding >> >> import birds >> import foods >> >> def feed_my_pet(): >> pet = birds.Parrot("Norwegian Blue") >> snack = foods.Spam("A tasty meat-like treat") >> pet.eats(snack) >> return "Yummy!" >> >> >> That is a good way of handling the problem. >> > Except for the minor facet that you are buying a new parrot each > time, and the bird dies after going "Yummy!" <G>
It's a Norwegian Blue with beautiful plumage. It's not dead, it's just pining for the fjords. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list