Fwd: Python-list Digest, Vol 52, Issue 128

2008-01-10 Thread Adrian Wood
Fredrik Lundh wrote: > > Adrian Wood wrote: > > > > I can call man.state() and then woman.state() or Person.state(man) and > > Person.state(woman) to print the status of each. This takes time and > > space however, and becomes unmanageable if we start talking about

Newbie question on Classes

2008-01-10 Thread Adrian Wood
Hi al! I'm new to the list, and reasonably new to Python, so be gentle. Long story short, I'm having a hard time finding a way to call a function on every object of a class at once. Example: I have a class Person, which has a function state(). This prints a basic string about the Person (position