[Edu-sig] Refocusing on Capabilities (was PySqueak)
kirby urner
kirby.urner at gmail.com
Sat May 27 02:35:36 CEST 2006
On 5/26/06, Ian Bicking <ianb at colorstudy.com> 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
More information about the Edu-sig
mailing list