[Zope-Coders] Re: ZCTextIndex too sensitive
Guido van Rossum
guido@python.org
Thu, 12 Jun 2003 15:06:54 -0400
> > In Python 2.1.x, callable built-in objects don't necessarily have a
> > __call__ attribute. Example:
>
> Yes, but how likely is it that the field attribute of an object
> represented by text in the code above actually is a callable builtin
> object like len, zip, repr etc.?
It was only an example. In 2.1, none of the built-in callable types
(e.g. class, method, function) have a __call__ attribute. About the
only thing for which callable(x) and hasattr(x, "__call__") coincide
is class instances.
--Guido van Rossum (home page: http://www.python.org/~guido/)