[Zope-Coders] Re: ZCTextIndex too sensitive
Philipp von Weitershausen
philipp@weitershausen.de
Thu, 12 Jun 2003 14:02:57 +0200
Guido van Rossum wrote:
>>But this should be ok:
>>
>>if callable(text):
>> try:
>> text.__call__
>> except AttributeError:
>> pass
>> else:
>> text = text()
>
>
> In Python 2.2, yes.
>
> 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.?
Phil