class question
sittner at lkb.ens.fr
sittner at lkb.ens.fr
Sat Mar 17 16:00:57 EDT 2007
Hello there,
i am pretty new to object-oriented programming and i have a question:
let's say i have a simple class such as:
class father:
age=...
name=....
def abcd.....
class son(father):
age=....
name=....
def efgh:
or any other heirarchic structure of class and subclasses.
i would like to list or print the data content of a given instance of the
subclass, all the way up (e.g. if sam is jack's son, so i would like to
get their names and ages and use the class as a data structure for that
matter).
how do i do this?
thanks,
t
More information about the Python-list
mailing list