[EMAIL PROTECTED] wrote:

> If the mechanic class had a "fixIt()" method defined, could I pass it
> any object I wanted

absolutely.

> and then just call the method that I expect to find there

yes.

> or do I need to strictly define the type, or class, of an object that is
> passed to a method.

no.  this is Python.  no need to negotiate with the compiler; just do what
you want, and the interpreter will tell you when that doesn't work.

also see:

    http://en.wikipedia.org/wiki/Duck_typing

</F>



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to