On 5/26/06, Ian Bicking <[EMAIL PROTECTED]> wrote: > > Inheritance as an abstraction used for communication. In other words, > giving someone a class and telling them to subclass it. Also, paying > attention to the class hierarchy when consuming objects is discouraged. > Actually, paying any attention to the class when consuming an object > is discouraged. >
Several important standard library modules give you the classes to inherit from, and invite you to write your own methods. HTML and XML parsing for example. I don't see where Python discourages subclassing. Then I think you're talking about duck typing, i.e. if it behaves a certain way, it's OK to pass, and the type checking police won't be strict about it, like in Java. That I understand. However, I wouldn't call that discouraging -- I find it encouraging myself. Too much type checking is a pain, and is what discourages Java use. Kirby _______________________________________________ Edu-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/edu-sig
