On Tue, 17 Aug 2010 09:12:39 am Huy Ton That wrote: > What do you mean by subclass?
It's a fundamental term from object-oriented programming. If you have a class that defines certain data and behaviour, you can create a *subclass* that inherits the same data and behaviour, except for specific examples which are over-ridden or over-loaded. A simple example: class MyInt(int): # creates a subclass of int def __str__(self): return "My Integer %d" % self MyInts are exactly the same as built-in ints except their string form is different. >>> n = MyInt(42) >>> print n My Integer 42 -- Steven D'Aprano _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor