On 5/5/06, Collin Winter <[EMAIL PROTECTED]> wrote:
> On 5/1/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> > The Type Error is actually referring to the type of 'foo' - the code is
> > clearly expecting it to be something with a different __call__ signature.
> >
> > However, for things like functions, there's nothing wrong with the type of 
> > the
> > supplied object. For functions, the problem is actually a Value Error, in 
> > that
> > the signature of that particular function *instance* is wrong.
>
> Is there anywhere else in Python where the type of an object isn't
> checkable with isinstance()?

Yes, it's called duck typing.

I'm not sure it's worth distinguishing call signature errors from
other type errors; there's already a gray area where sometimes a
TypeError is reported as an AttributeError or vice versa.

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to