Good Site on Classes
Wishbone-Ash
abc at spud.dink.org
Sat Mar 18 19:36:56 EST 2000
On Fri, 17 Mar 2000 15:26:06 -0700, Enrique Herrera <pony at nmt.edu> wrote:
>> What i am trying to do is have one class get information from another
>> class. I hope that makes any sense.
Sounds like you mean creating a sub-class ? Inheritance is done by
defining your class with the superclass in parentheses:
class my_exc(Exception):
my_exc will inherit all the attributes of the top-level Exception class.
IMO, there can be no better tutorial than the one written by the author
at http://www.python.org/
More information about the Python-list
mailing list